mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 22:48:03 +01:00
Reduce tests duration
This commit is contained in:
parent
89f868f48f
commit
21c8e96132
1 changed files with 8 additions and 16 deletions
|
@ -17,9 +17,7 @@ from party.models import BattleEffect, Party
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_add_character_to_existing_group(
|
def test_add_character_to_existing_group(selenium: WebDriver, live_server: LiveServer):
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
|
||||||
):
|
|
||||||
username, password = "gm", "password"
|
username, password = "gm", "password"
|
||||||
gm = User.objects.create_user(username, password=password)
|
gm = User.objects.create_user(username, password=password)
|
||||||
player = User.objects.create_user("player")
|
player = User.objects.create_user("player")
|
||||||
|
@ -43,7 +41,7 @@ def test_add_character_to_existing_group(
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_gm_observe_invited_character_in_group(
|
def test_gm_observe_invited_character_in_group(
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
selenium: WebDriver, live_server: LiveServer
|
||||||
):
|
):
|
||||||
username, password = "gm", "password"
|
username, password = "gm", "password"
|
||||||
gm = User.objects.create_user(username, password=password)
|
gm = User.objects.create_user(username, password=password)
|
||||||
|
@ -67,7 +65,7 @@ def test_gm_observe_invited_character_in_group(
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_gm_observe_invited_character_in_two_groups(
|
def test_gm_observe_invited_character_in_two_groups(
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
selenium: WebDriver, live_server: LiveServer
|
||||||
):
|
):
|
||||||
username, password = "gm", "password"
|
username, password = "gm", "password"
|
||||||
gm = User.objects.create_user(username, password=password)
|
gm = User.objects.create_user(username, password=password)
|
||||||
|
@ -120,9 +118,7 @@ def test_reset_stats_view(
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_player_can_add_effect_to_group(
|
def test_player_can_add_effect_to_group(selenium: WebDriver, live_server: LiveServer):
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
|
||||||
):
|
|
||||||
"""Any member of a group can add effects to the group."""
|
"""Any member of a group can add effects to the group."""
|
||||||
user, password = "player", "password"
|
user, password = "player", "password"
|
||||||
player = User.objects.create_user(user, password=password)
|
player = User.objects.create_user(user, password=password)
|
||||||
|
@ -151,9 +147,7 @@ def test_player_can_add_effect_to_group(
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_gm_can_add_effect_to_group(
|
def test_gm_can_add_effect_to_group(selenium: WebDriver, live_server: LiveServer):
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
|
||||||
):
|
|
||||||
"""The GM of a group can add effects to the group."""
|
"""The GM of a group can add effects to the group."""
|
||||||
user, password = "gm", "password"
|
user, password = "gm", "password"
|
||||||
gm = User.objects.create_user(user, password=password)
|
gm = User.objects.create_user(user, password=password)
|
||||||
|
@ -182,9 +176,7 @@ def test_gm_can_add_effect_to_group(
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_gm_can_change_remaining_rounds(
|
def test_gm_can_change_remaining_rounds(selenium: WebDriver, live_server: LiveServer):
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
|
||||||
):
|
|
||||||
"""The GM of a group can increase or decrease the remaining rounds of effects."""
|
"""The GM of a group can increase or decrease the remaining rounds of effects."""
|
||||||
user, password = "gm", "password"
|
user, password = "gm", "password"
|
||||||
gm = User.objects.create_user(user, password=password)
|
gm = User.objects.create_user(user, password=password)
|
||||||
|
@ -254,7 +246,7 @@ def test_gm_can_change_remaining_rounds(
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_gm_can_delete_any_existing_effect(
|
def test_gm_can_delete_any_existing_effect(
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
selenium: WebDriver, live_server: LiveServer
|
||||||
):
|
):
|
||||||
"""The GM of a group can delete any existing effect, running or terminated."""
|
"""The GM of a group can delete any existing effect, running or terminated."""
|
||||||
user, password = "gm", "password"
|
user, password = "gm", "password"
|
||||||
|
@ -275,7 +267,7 @@ def test_gm_can_delete_any_existing_effect(
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_player_cant_change_existing_running_effect(
|
def test_player_cant_change_existing_running_effect(
|
||||||
selenium: WebDriver, live_server: LiveServer, initial_data: None
|
selenium: WebDriver, live_server: LiveServer
|
||||||
):
|
):
|
||||||
"""Members of the group can only view existing running effects, no update."""
|
"""Members of the group can only view existing running effects, no update."""
|
||||||
user, password = "player", "password"
|
user, password = "player", "password"
|
||||||
|
|
Loading…
Reference in a new issue