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 11from unittest .mock import MagicMock
22
3- from django . test import SimpleTestCase
3+ import pytest
44
55from django_prometheus .migrations import ExportMigrationsForDatabase
66from django_prometheus .testutils import assert_metric_equal
@@ -15,7 +15,8 @@ def M(metric_name):
1515 return "django_migrations_%s" % metric_name
1616
1717
18- class TestMigrations (SimpleTestCase ):
18+ @pytest .mark .django_db ()
19+ class TestMigrations :
1920 """Test migration counters."""
2021
2122 def test_counters (self ):
Original file line number Diff line number Diff line change 1- from django . test import TestCase
1+ import pytest
22from testapp .models import Dog , Lawn
33
44from django_prometheus .testutils import assert_metric_diff , save_registry
@@ -13,7 +13,8 @@ def M(metric_name):
1313 return "django_model_%s" % metric_name
1414
1515
16- class TestModelMetrics (TestCase ):
16+ @pytest .mark .django_db ()
17+ class TestModelMetrics :
1718 """Test django_prometheus.models."""
1819
1920 def test_counters (self ):
You can’t perform that action at this time.
0 commit comments