File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
django_prometheus/tests/end2end/testapp Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
from unittest .mock import MagicMock
2
2
3
- from django . test import SimpleTestCase
3
+ import pytest
4
4
5
5
from django_prometheus .migrations import ExportMigrationsForDatabase
6
6
from django_prometheus .testutils import assert_metric_equal
@@ -15,7 +15,8 @@ def M(metric_name):
15
15
return "django_migrations_%s" % metric_name
16
16
17
17
18
- class TestMigrations (SimpleTestCase ):
18
+ @pytest .mark .django_db ()
19
+ class TestMigrations :
19
20
"""Test migration counters."""
20
21
21
22
def test_counters (self ):
Original file line number Diff line number Diff line change 1
- from django . test import TestCase
1
+ import pytest
2
2
from testapp .models import Dog , Lawn
3
3
4
4
from django_prometheus .testutils import assert_metric_diff , save_registry
@@ -13,7 +13,8 @@ def M(metric_name):
13
13
return "django_model_%s" % metric_name
14
14
15
15
16
- class TestModelMetrics (TestCase ):
16
+ @pytest .mark .django_db ()
17
+ class TestModelMetrics :
17
18
"""Test django_prometheus.models."""
18
19
19
20
def test_counters (self ):
You can’t perform that action at this time.
0 commit comments