Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Aug 25, 2024
1 parent a5987f6 commit 61476b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rdmo/projects/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_set_context_querystring_with_filter_and_page(GET_query):
assert context.get('querystring', 'not-in-context') == 'not-in-context'


def test_copy_project(db):
def test_copy_project(db, files):
project = Project.objects.get(id=1)
site = Site.objects.get(id=2)
user = User.objects.get(id=1)
Expand Down
8 changes: 4 additions & 4 deletions rdmo/projects/tests/test_view_project_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_project_copy_forbidden_get(db, client, settings):

@pytest.mark.parametrize('username,password', users)
@pytest.mark.parametrize('project_id', projects)
def test_project_copy_post(db, client, username, password, project_id):
def test_project_copy_post(db, files, client, username, password, project_id):
client.login(username=username, password=password)

project_count = Project.objects.count()
Expand Down Expand Up @@ -131,7 +131,7 @@ def test_project_copy_post(db, client, username, password, project_id):
assert Value.objects.count() == value_count


def test_project_copy_post_restricted(db, client, settings):
def test_project_copy_post_restricted(db, files, client, settings):
settings.PROJECT_CREATE_RESTRICTED = True
settings.PROJECT_CREATE_GROUPS = ['projects']

Expand All @@ -152,7 +152,7 @@ def test_project_copy_post_restricted(db, client, settings):
assert response.status_code == 302


def test_project_copy_post_forbidden(db, client, settings):
def test_project_copy_post_forbidden(db, files, client, settings):
settings.PROJECT_CREATE_RESTRICTED = True

client.login(username='guest', password='guest')
Expand All @@ -170,7 +170,7 @@ def test_project_copy_post_forbidden(db, client, settings):

@pytest.mark.parametrize('username,password', users)
@pytest.mark.parametrize('project_id', projects)
def test_project_copy_parent_post(db, client, username, password, project_id):
def test_project_copy_parent_post(db, files, client, username, password, project_id):
client.login(username=username, password=password)
project_count = Project.objects.count()

Expand Down
4 changes: 2 additions & 2 deletions rdmo/projects/tests/test_viewset_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_create_parent(db, client, username, password, project_id):

@pytest.mark.parametrize('username,password', users)
@pytest.mark.parametrize('project_id', projects)
def test_copy(db, client, username, password, project_id):
def test_copy(db, files, client, username, password, project_id):
client.login(username=username, password=password)

project_count = Project.objects.count()
Expand Down Expand Up @@ -260,7 +260,7 @@ def test_copy(db, client, username, password, project_id):
assert Value.objects.count() == value_count


def test_copy_restricted(db, client, settings):
def test_copy_restricted(db, files, client, settings):
settings.PROJECT_CREATE_RESTRICTED = True
settings.PROJECT_CREATE_GROUPS = ['projects']

Expand Down

0 comments on commit 61476b7

Please sign in to comment.