Regular v.s. Django Testcase: be explicit

I recently ran into a funny issue where the TestCases were influencing my
development DB's contents
This commit is contained in:
Klaas van Schelven
2024-04-15 09:17:53 +02:00
parent d4b4e631fb
commit 2c4e8b9f20
9 changed files with 22 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
from django.test import TestCase
from django.test import TestCase as DjangoTestCase
from django.core import mail
from django.contrib.auth.models import User
@@ -12,7 +12,7 @@ from .tasks import send_new_issue_alert, send_regression_alert, send_unmute_aler
from .views import DEBUG_CONTEXTS
class TestAlertSending(TestCase):
class TestAlertSending(DjangoTestCase):
def test_send_new_issue_alert(self):
project = Project.objects.create(name="Test project")