Skip to content

Commit

Permalink
Run formatters in tests/
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Gutiérrez committed Feb 16, 2021
1 parent 43a811e commit 3c7f1bc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/app/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_block_admin(self):
('video', self.video.id)
])
}))

def test_block_basic_render(self):
page = self.root_page.add_child(instance=TestPage(
title='Test',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_admin_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test_with_usage_count(self):
self.assertContains(response, expected_url)

def test_edit(self):
response = self.post({
self.post({
'title': "Edited",
})

Expand All @@ -246,7 +246,7 @@ def test_edit_with_new_video_file(self):
self.video.save()

new_file = create_test_video_file()
response = self.post({
self.post({
'title': "Edited",
'file': SimpleUploadedFile('new.mp4', new_file.read(), "video/mp4"),
})
Expand Down
5 changes: 3 additions & 2 deletions tests/test_custom_model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, override_settings
from wagtail.tests.utils import WagtailTestUtils

from tests.app.models import CustomVideoModel
from wagtailvideos import get_video_model, get_video_model_string
from wagtailvideos.models import Video

from tests.app.models import CustomVideoModel

class TestGetVideoModel(WagtailTestUtils, TestCase):
@override_settings(WAGTAILVIDEOS_VIDEO_MODEL='app.CustomVideoModel')
Expand All @@ -29,4 +30,4 @@ def test_unknown_get_video_model(self):
@override_settings(WAGTAILVIDEOS_VIDEO_MODEL='invalid-string')
def test_invalid_get_video_model(self):
with self.assertRaises(ImproperlyConfigured):
get_video_model()
get_video_model()
4 changes: 2 additions & 2 deletions tests/test_template_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from django.template import Context, Template, TemplateSyntaxError
from django.test import TestCase
from tests.utils import create_test_video_file, create_test_vtt_file

from wagtailvideos.models import Video, TrackListing, VideoTrack
from tests.utils import create_test_video_file, create_test_vtt_file
from wagtailvideos.models import TrackListing, Video, VideoTrack


class TestVideoTag(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os

import tests
from django.core.files import File

import tests


def create_test_video_file():
video_file = open(os.path.join(tests.__path__[0], 'small.mp4'), 'rb')
Expand Down

0 comments on commit 3c7f1bc

Please sign in to comment.