15
15
16
16
__all__ = [
17
17
"django_db_setup" ,
18
- "db " ,
19
- "transactional_db " ,
18
+ "django_db " ,
19
+ "django_transactional_db " ,
20
20
"django_db_reset_sequences" ,
21
- "admin_user " ,
21
+ "django_admin_user " ,
22
22
"django_user_model" ,
23
23
"django_username_field" ,
24
- "client " ,
25
- "admin_client " ,
26
- "rf " ,
27
- "settings " ,
28
- "live_server " ,
24
+ "django_client " ,
25
+ "django_admin_client " ,
26
+ "django_rf " ,
27
+ "django_settings " ,
28
+ "django_live_server " ,
29
29
"_live_server_helper" ,
30
30
"django_assert_num_queries" ,
31
31
"django_assert_max_num_queries" ,
@@ -157,7 +157,7 @@ def _disable_native_migrations():
157
157
158
158
159
159
@pytest .fixture (scope = "function" )
160
- def db (request , django_db_setup , django_db_blocker ):
160
+ def django_db (request , django_db_setup , django_db_blocker ):
161
161
"""Require a django test database.
162
162
163
163
This database will be setup with the default fixtures and will have
@@ -183,7 +183,7 @@ def db(request, django_db_setup, django_db_blocker):
183
183
184
184
185
185
@pytest .fixture (scope = "function" )
186
- def transactional_db (request , django_db_setup , django_db_blocker ):
186
+ def django_transactional_db (request , django_db_setup , django_db_blocker ):
187
187
"""Require a django test database with transaction support.
188
188
189
189
This will re-initialise the django database for each test and is
@@ -220,7 +220,7 @@ def django_db_reset_sequences(request, django_db_setup, django_db_blocker):
220
220
221
221
222
222
@pytest .fixture ()
223
- def client ():
223
+ def django_client ():
224
224
"""A Django test client instance."""
225
225
skip_if_no_django ()
226
226
@@ -244,7 +244,7 @@ def django_username_field(django_user_model):
244
244
245
245
246
246
@pytest .fixture ()
247
- def admin_user (db , django_user_model , django_username_field ):
247
+ def django_admin_user (db , django_user_model , django_username_field ):
248
248
"""A Django admin user.
249
249
250
250
This uses an existing user with username "admin", or creates a new one with
@@ -267,7 +267,7 @@ def admin_user(db, django_user_model, django_username_field):
267
267
268
268
269
269
@pytest .fixture ()
270
- def admin_client (db , admin_user ):
270
+ def django_admin_client (db , admin_user ):
271
271
"""A Django test client logged in as an admin user."""
272
272
from django .test .client import Client
273
273
@@ -277,7 +277,7 @@ def admin_client(db, admin_user):
277
277
278
278
279
279
@pytest .fixture ()
280
- def rf ():
280
+ def django_rf ():
281
281
"""RequestFactory instance"""
282
282
skip_if_no_django ()
283
283
@@ -320,7 +320,7 @@ def finalize(self):
320
320
321
321
322
322
@pytest .yield_fixture ()
323
- def settings ():
323
+ def django_settings ():
324
324
"""A Django settings object which restores changes after the testrun"""
325
325
skip_if_no_django ()
326
326
@@ -330,7 +330,7 @@ def settings():
330
330
331
331
332
332
@pytest .fixture (scope = "session" )
333
- def live_server (request ):
333
+ def django_live_server (request ):
334
334
"""Run a live Django server in the background during tests
335
335
336
336
The address the server is started from is taken from the
0 commit comments