Use SimpleTestCase for unit tests
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""
|
||||
Module for storing 'real' _unit_ tests.
|
||||
Meaning, they should test single small units e.g. methods or functions in an isolated way.
|
||||
|
||||
Try to use django.test.SimpleTestCase to prevent unnecessary database setup and improve speed.
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from django.test import TestCase
|
||||
from django.test import SimpleTestCase
|
||||
from videodinges.models import get_quality_by_name
|
||||
|
||||
class GetQualityByNameTestCase(TestCase):
|
||||
class GetQualityByNameTestCase(SimpleTestCase):
|
||||
|
||||
def test_returns_quality_if_listed(self):
|
||||
result = get_quality_by_name('480p')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from django.test import TestCase
|
||||
from django.test import SimpleTestCase
|
||||
from videodinges.models import TranscodingType, get_short_name_of_transcoding_type
|
||||
|
||||
class GetShortNameOfTranscodingTypeTestCase(TestCase):
|
||||
class GetShortNameOfTranscodingTypeTestCase(SimpleTestCase):
|
||||
|
||||
def test_gets_transcoding_by_name(self):
|
||||
result = get_short_name_of_transcoding_type('video/webm; codecs="vp8, vorbis"')
|
||||
|
||||
Reference in New Issue
Block a user