test_can_overwrite_kwargs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from django.test import TestCase
|
||||
from videodinges.models import Transcoding
|
||||
from videodinges.models import Transcoding, Video
|
||||
from tests.videodinges import factories
|
||||
from datetime import datetime
|
||||
|
||||
@@ -10,3 +10,17 @@ class TranscodingTestCase(TestCase):
|
||||
self.assertEqual(transcoding.quality, '360p')
|
||||
self.assertEqual(transcoding.type, 'video/webm')
|
||||
self.assertEqual(transcoding.url, 'https://some_url')
|
||||
|
||||
def test_can_overwrite_kwargs(self):
|
||||
transcoding = factories.create(
|
||||
Transcoding,
|
||||
quality='720p',
|
||||
type='video/mp4',
|
||||
url='http://another_url',
|
||||
video=factories.create(Video, slug='yet-another-video-slug')
|
||||
)
|
||||
|
||||
self.assertEqual(transcoding.video.slug, 'yet-another-video-slug')
|
||||
self.assertEqual(transcoding.quality, '720p')
|
||||
self.assertEqual(transcoding.type, 'video/mp4')
|
||||
self.assertEqual(transcoding.url, 'http://another_url')
|
||||
|
||||
Reference in New Issue
Block a user