Skip to content

Commit

Permalink
Merge pull request #735 from tcely/patch-2
Browse files Browse the repository at this point in the history
Ensure the directory exists for testing
  • Loading branch information
meeb authored Feb 17, 2025
2 parents a0453d0 + 1e5f295 commit 676b2c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
.gitattributes
README.md
tubesync/media
tubesync/downloads
db.sqlite3
tubesync/tubesync/downloads
db.sqlite3
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ db.sqlite3
db.sqlite3-journal
/tubesync/static/
/tubesync/media/
/tubesync/downloads/
/tubesync/tubesync/downloads/

# Flask stuff:
instance/
Expand Down Expand Up @@ -136,4 +136,4 @@ Pipfile.lock
.vscode/launch.json

# Ignore Jetbrains IDE files
.idea/
.idea/
4 changes: 3 additions & 1 deletion tubesync/sync/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from django.utils import timezone
from background_task.models import Task
from .models import Source, Media
from .tasks import cleanup_old_media
from .tasks import cleanup_old_media, check_source_directory_exists
from .filtering import filter_media
from .utils import filter_response
from .choices import (Val, Fallback, IndexSchedule, SourceResolution,
Expand Down Expand Up @@ -212,6 +212,8 @@ def test_source(self):
task = Task.objects.get_task('sync.tasks.index_source_task',
args=(source_uuid,))[0]
self.assertEqual(task.queue, source_uuid)
# Run the check_source_directory_exists task
check_source_directory_exists.now(source_uuid)
# Check the source is now on the source overview page
response = c.get('/sources')
self.assertEqual(response.status_code, 200)
Expand Down

0 comments on commit 676b2c3

Please sign in to comment.