-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: fix up fixtures and dependencies
- Loading branch information
Showing
6 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
import pytest | ||
|
||
from tests.factories import ClientFactory, SalesRepFactory | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def base_url(live_server): | ||
return live_server.url | ||
|
||
|
||
@pytest.fixture | ||
@pytest.mark.usefixtures("db") | ||
def user(): | ||
return SalesRepFactory() | ||
|
||
|
||
@pytest.fixture() | ||
def client(client, user): | ||
client.force_login(user) | ||
return client | ||
|
||
|
||
@pytest.fixture | ||
def three_clients(user): | ||
return ClientFactory.create_batch(3, assigned_to=user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ pytest-django==4.5.2 | |
pytest-cov==4.1.0 | ||
pytest-playwright==0.4.4 | ||
pytest-env==1.1.3 | ||
tzdata==2024.1 |