diff --git a/tests/videodinges/unit/__init__.py b/tests/videodinges/unit/__init__.py index 9f57084..63d748f 100644 --- a/tests/videodinges/unit/__init__.py +++ b/tests/videodinges/unit/__init__.py @@ -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. """ diff --git a/tests/videodinges/unit/models/test_get_quality_by_name.py b/tests/videodinges/unit/models/test_get_quality_by_name.py index 6184035..02061fc 100644 --- a/tests/videodinges/unit/models/test_get_quality_by_name.py +++ b/tests/videodinges/unit/models/test_get_quality_by_name.py @@ -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') diff --git a/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py b/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py index 0b409e5..fea697d 100644 --- a/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py +++ b/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py @@ -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"')