Skip to content

Commit 9e11148

Browse files
Gabriel MonroyMatthew Fisher
authored andcommitted
fix(tests): use TransactionTestCase where threads are used
1 parent 2fb3dfd commit 9e11148

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

controller/api/tests/test_build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
import json
1010

11-
from django.test import TestCase
11+
from django.test import TransactionTestCase
1212
from django.test.utils import override_settings
1313

1414
from api.models import Build
1515

1616

1717
@override_settings(CELERY_ALWAYS_EAGER=True)
18-
class BuildTest(TestCase):
18+
class BuildTest(TransactionTestCase):
1919

2020
"""Tests build notification from build system"""
2121

controller/api/tests/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
import json
1010

11-
from django.test import TestCase
11+
from django.test import TransactionTestCase
1212
from django.test.utils import override_settings
1313

1414
from api.models import Config
1515

1616

1717
@override_settings(CELERY_ALWAYS_EAGER=True)
18-
class ConfigTest(TestCase):
18+
class ConfigTest(TransactionTestCase):
1919

2020
"""Tests setting and updating config values"""
2121

controller/api/tests/test_hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
import json
1010

11-
from django.test import TestCase
11+
from django.test import TransactionTestCase
1212
from django.test.utils import override_settings
1313

1414
from deis import settings
1515

1616

1717
@override_settings(CELERY_ALWAYS_EAGER=True)
18-
class HookTest(TestCase):
18+
class HookTest(TransactionTestCase):
1919

2020
"""Tests API hooks used to trigger actions from external components"""
2121

controller/api/tests/test_release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
import json
1010

11-
from django.test import TestCase
11+
from django.test import TransactionTestCase
1212
from django.test.utils import override_settings
1313

1414
from api.models import Release
1515

1616

1717
@override_settings(CELERY_ALWAYS_EAGER=True)
18-
class ReleaseTest(TestCase):
18+
class ReleaseTest(TransactionTestCase):
1919

2020
"""Tests push notification from build system"""
2121

0 commit comments

Comments
 (0)