Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit 5776cbe

Browse files
committed
refactor(tests): rename pems_web directory
move some pems_web specific fixtures/tests around
1 parent 9943b4d commit 5776cbe

17 files changed

+22
-23
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ preserve_blank_lines = true
5454
use_gitignore = true
5555

5656
[tool.pytest.ini_options]
57-
DJANGO_SETTINGS_MODULE = "tests.pytest.settings"
57+
DJANGO_SETTINGS_MODULE = "tests.pytest.pems_web.settings"
5858

5959
[tool.setuptools_scm]
6060
# intentionally left blank, but we need the section header to activate the tool

tests/pytest/conftest.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
import pytest
21
from pytest_socket import disable_socket
32

43

54
def pytest_runtest_setup():
65
disable_socket()
7-
8-
9-
@pytest.fixture
10-
def app_request(rf):
11-
"""
12-
Fixture creates and initializes a new Django request object similar to a real application request.
13-
"""
14-
# create a request for the path, initialize
15-
app_request = rf.get("/some/arbitrary/path")
16-
17-
return app_request

tests/pytest/pems/conftest.py

Lines changed: 0 additions & 10 deletions
This file was deleted.
File renamed without changes.

tests/pytest/pems_web/conftest.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import pytest
2+
3+
from pems_web.districts.models import District
4+
5+
6+
@pytest.fixture
7+
def app_request(rf):
8+
"""
9+
Fixture creates and initializes a new Django request object similar to a real application request.
10+
"""
11+
# create a request for the path, initialize
12+
app_request = rf.get("/some/arbitrary/path")
13+
14+
return app_request
15+
16+
17+
@pytest.fixture
18+
def model_District():
19+
district = District.objects.create(number="1", name="Eureka")
20+
21+
return district
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)