mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 06:28:03 +01:00
Compare commits
No commits in common. "7351af53db0abb0633825ab5e3a55885ad6c0895" and "730e253d00ba42c6ed1a64f82f1bacfcbe9e204a" have entirely different histories.
7351af53db
...
730e253d00
8 changed files with 30 additions and 30 deletions
|
@ -40,7 +40,7 @@ repos:
|
|||
hooks:
|
||||
- id: djhtml
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.6.1
|
||||
rev: v0.5.7
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
|
|
|
@ -53,7 +53,7 @@ idna==3.7
|
|||
# via
|
||||
# requests
|
||||
# trio
|
||||
markdown==3.7
|
||||
markdown==3.6
|
||||
# via -r requirements.in
|
||||
outcome==1.3.0.post0
|
||||
# via trio
|
||||
|
|
|
@ -54,7 +54,7 @@ django==5.1
|
|||
# django-browser-reload
|
||||
# django-debug-toolbar
|
||||
# model-bakery
|
||||
django-browser-reload==1.15.0
|
||||
django-browser-reload==1.13.0
|
||||
# via -r requirements-dev.in
|
||||
django-debug-toolbar==4.4.6
|
||||
# via -r requirements-dev.in
|
||||
|
@ -66,7 +66,7 @@ h11==0.14.0
|
|||
# via
|
||||
# -c constraints.txt
|
||||
# wsproto
|
||||
hypothesis==6.111.1
|
||||
hypothesis==6.111.0
|
||||
# via -r requirements-dev.in
|
||||
identify==2.6.0
|
||||
# via pre-commit
|
||||
|
@ -83,7 +83,7 @@ jinja2==3.1.4
|
|||
# via pytest-html
|
||||
markupsafe==2.1.5
|
||||
# via jinja2
|
||||
model-bakery==1.19.3
|
||||
model-bakery==1.19.1
|
||||
# via -r requirements-dev.in
|
||||
mypy-extensions==1.0.0
|
||||
# via black
|
||||
|
@ -155,7 +155,7 @@ requests==2.32.3
|
|||
# bpython
|
||||
# pytest-base-url
|
||||
# pytest-selenium
|
||||
ruff==0.6.1
|
||||
ruff==0.5.7
|
||||
# via -r requirements-dev.in
|
||||
selenium==4.23.1
|
||||
# via
|
||||
|
@ -215,5 +215,5 @@ wsproto==1.2.0
|
|||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==24.2
|
||||
# via pip-tools
|
||||
setuptools==72.2.0
|
||||
setuptools==72.1.0
|
||||
# via pip-tools
|
||||
|
|
|
@ -53,7 +53,7 @@ idna==3.7
|
|||
# via
|
||||
# requests
|
||||
# trio
|
||||
markdown==3.7
|
||||
markdown==3.6
|
||||
# via -r requirements.in
|
||||
outcome==1.3.0.post0
|
||||
# via trio
|
||||
|
|
|
@ -8,7 +8,7 @@ from common.models import User
|
|||
from party.models import Party
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_can_access_own_character(client):
|
||||
player = User.objects.create_user("username", password="password")
|
||||
|
||||
|
@ -24,7 +24,7 @@ def test_can_access_own_character(client):
|
|||
assert gm_notes not in body
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_cant_access_random_character(client):
|
||||
player = User.objects.create_user("user", password="password")
|
||||
other = User.objects.create_user("other", password="password")
|
||||
|
@ -35,7 +35,7 @@ def test_cant_access_random_character(client):
|
|||
assert res.status_code == HTTPStatus.NOT_FOUND
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_can_access_character_in_party(client):
|
||||
player = User.objects.create_user("user", password="password")
|
||||
friend = User.objects.create_user("friend", password="password")
|
||||
|
@ -61,7 +61,7 @@ def test_can_access_character_in_party(client):
|
|||
assert gm_notes not in body
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_game_master_can_access_character_in_party(client):
|
||||
player = User.objects.create_user("user", password="password")
|
||||
gm = User.objects.create_user("gm", password="password")
|
||||
|
|
|
@ -12,7 +12,7 @@ from character.models import Character, Profile
|
|||
from common.models import User
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_create_character(selenium: WebDriver, live_server: LiveServer):
|
||||
# Load fixtures
|
||||
call_command("loaddata", "initial_data")
|
||||
|
@ -93,7 +93,7 @@ def test_create_character(selenium: WebDriver, live_server: LiveServer):
|
|||
assert getattr(character, name) == value
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_change_health(selenium: WebDriver, live_server: LiveServer):
|
||||
call_command("loaddata", "initial_data")
|
||||
username, password = "user1", "some_password"
|
||||
|
@ -157,7 +157,7 @@ def test_change_health(selenium: WebDriver, live_server: LiveServer):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_list_characters(selenium: WebDriver, live_server: LiveServer):
|
||||
# Load fixtures
|
||||
call_command("loaddata", "initial_data")
|
||||
|
@ -190,7 +190,7 @@ def test_list_characters(selenium: WebDriver, live_server: LiveServer):
|
|||
assert names == expected_names
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_delete_character(selenium: WebDriver, live_server: LiveServer):
|
||||
call_command("loaddata", "initial_data")
|
||||
|
||||
|
@ -212,7 +212,7 @@ def test_delete_character(selenium: WebDriver, live_server: LiveServer):
|
|||
assert Character.objects.filter(pk=characters[0].pk).first() is None
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_reset_stats_view(
|
||||
selenium: WebDriver,
|
||||
live_server: LiveServer,
|
||||
|
|
|
@ -8,7 +8,7 @@ def _collectstatic():
|
|||
call_command("collectstatic", "--clear", "--noinput", "--verbosity=0")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture()
|
||||
def live_server(settings, live_server):
|
||||
settings.STORAGES = {
|
||||
"default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
|
||||
|
@ -19,13 +19,13 @@ def live_server(settings, live_server):
|
|||
return live_server
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture()
|
||||
def firefox_options(firefox_options):
|
||||
firefox_options.add_argument("-headless")
|
||||
return firefox_options
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture()
|
||||
def selenium(selenium: WebDriver) -> WebDriver:
|
||||
selenium.implicitly_wait(3)
|
||||
selenium.set_window_size(3860, 2140)
|
||||
|
@ -38,6 +38,6 @@ def settings(settings):
|
|||
return settings
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def initial_data() -> None:
|
||||
@pytest.fixture()
|
||||
def initial_data() -> None: # noqa: PT004
|
||||
call_command("loaddata", "initial_data")
|
||||
|
|
|
@ -15,7 +15,7 @@ from common.models import User
|
|||
from party.models import BattleEffect, Party
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_add_character_to_existing_group(selenium: WebDriver, live_server: LiveServer):
|
||||
username, password = "gm", "password"
|
||||
gm = User.objects.create_user(username, password=password)
|
||||
|
@ -39,7 +39,7 @@ def test_add_character_to_existing_group(selenium: WebDriver, live_server: LiveS
|
|||
assert set(party.invited_characters.all()) == {character}
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_gm_observe_invited_character_in_group(
|
||||
selenium: WebDriver,
|
||||
live_server: LiveServer,
|
||||
|
@ -66,7 +66,7 @@ def test_gm_observe_invited_character_in_group(
|
|||
assert title == character.name
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_gm_observe_invited_character_in_two_groups(
|
||||
selenium: WebDriver,
|
||||
live_server: LiveServer,
|
||||
|
@ -95,7 +95,7 @@ def test_gm_observe_invited_character_in_two_groups(
|
|||
assert title == character.name
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_reset_stats_view(
|
||||
selenium: WebDriver,
|
||||
live_server: LiveServer,
|
||||
|
@ -125,7 +125,7 @@ def test_reset_stats_view(
|
|||
assert character.luck_points_remaining == character.luck_points_max
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_player_can_add_effect_to_group(selenium: WebDriver, live_server: LiveServer):
|
||||
"""Any member of a group can add effects to the group."""
|
||||
user, password = "player", "password"
|
||||
|
@ -154,7 +154,7 @@ def test_player_can_add_effect_to_group(selenium: WebDriver, live_server: LiveSe
|
|||
assert effect.description in element.text
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_gm_can_add_effect_to_group(selenium: WebDriver, live_server: LiveServer):
|
||||
"""The GM of a group can add effects to the group."""
|
||||
user, password = "gm", "password"
|
||||
|
@ -183,7 +183,7 @@ def test_gm_can_add_effect_to_group(selenium: WebDriver, live_server: LiveServer
|
|||
assert effect.description in element.text
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_gm_can_change_remaining_rounds(selenium: WebDriver, live_server: LiveServer):
|
||||
"""The GM of a group can increase or decrease the remaining rounds of effects."""
|
||||
user, password = "gm", "password"
|
||||
|
@ -261,7 +261,7 @@ def test_gm_can_change_remaining_rounds(selenium: WebDriver, live_server: LiveSe
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.django_db()
|
||||
def test_gm_can_delete_any_existing_effect(
|
||||
selenium: WebDriver,
|
||||
live_server: LiveServer,
|
||||
|
|
Loading…
Reference in a new issue