Skip to content

Commit 142bb24

Browse files
authored
rename tests (#387)
1 parent ac1f786 commit 142bb24

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

django_prometheus/tests/end2end/testapp/test_caches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class TestCachesMetrics(PrometheusTestCaseMixin, TestCase):
99
"""Test django_prometheus.caches metrics."""
1010

11-
def testCounters(self):
11+
def test_counters(self):
1212
supported_caches = [
1313
"memcached.PyLibMCCache",
1414
"memcached.PyMemcacheCache",

django_prometheus/tests/end2end/testapp/test_db.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ class TestDbMetrics(BaseDbMetricTest):
2222
threshold, or check by how much it increased during the test.
2323
"""
2424

25-
def testConfigHasExpectedDatabases(self):
25+
def test_config_has_expected_databases(self):
2626
"""Not a real unit test: ensures that testapp.settings contains the
2727
databases this test expects."""
2828
assert "default" in connections.databases.keys()
2929
assert "test_db_1" in connections.databases.keys()
3030
assert "test_db_2" in connections.databases.keys()
3131

32-
def testCounters(self):
32+
def test_counters(self):
3333
cursor_db1 = connections["test_db_1"].cursor()
3434
cursor_db2 = connections["test_db_2"].cursor()
3535
cursor_db1.execute("SELECT 1")
@@ -51,7 +51,7 @@ def testCounters(self):
5151
assert self.getMetric("django_db_execute_total", alias="test_db_1", vendor="sqlite") > 0
5252
assert self.getMetric("django_db_execute_total", alias="test_db_2", vendor="sqlite") >= 200
5353

54-
def testHistograms(self):
54+
def test_histograms(self):
5555
cursor_db1 = connections["test_db_1"].cursor()
5656
cursor_db2 = connections["test_db_2"].cursor()
5757
cursor_db1.execute("SELECT 1")
@@ -74,7 +74,7 @@ def testHistograms(self):
7474
>= 200
7575
)
7676

77-
def testExecuteMany(self):
77+
def test_execute_many(self):
7878
registry = self.saveRegistry()
7979
cursor_db1 = connections["test_db_1"].cursor()
8080
cursor_db1.executemany(
@@ -101,7 +101,7 @@ class TestPostgresDbMetrics(BaseDbMetricTest):
101101
threshold, or check by how much it increased during the test.
102102
"""
103103

104-
def testCounters(self):
104+
def test_counters(self):
105105
registry = self.saveRegistry()
106106
cursor = connections["postgresql"].cursor()
107107

@@ -128,7 +128,7 @@ class TestMysDbMetrics(BaseDbMetricTest):
128128
threshold, or check by how much it increased during the test.
129129
"""
130130

131-
def testCounters(self):
131+
def test_counters(self):
132132
registry = self.saveRegistry()
133133
cursor = connections["mysql"].cursor()
134134

@@ -155,7 +155,7 @@ class TestPostgisDbMetrics(BaseDbMetricTest):
155155
threshold, or check by how much it increased during the test.
156156
"""
157157

158-
def testCounters(self):
158+
def test_counters(self):
159159
r = self.saveRegistry()
160160
cursor = connections["postgis"].cursor()
161161

django_prometheus/tests/test_testutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def testAssertMetricEquals(self):
8989
labelblue="sky",
9090
)
9191

92-
def testRegistrySaving(self):
92+
def test_registry_saving(self):
9393
"""Tests saveRegistry and frozen registries operations."""
9494
frozen_registry = self.test_case.saveRegistry(registry=self.registry)
9595
# Test that we can manipulate a frozen scalar metric.

0 commit comments

Comments
 (0)