Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add throttling to contact api endpoint #1231

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rdmo/projects/tests/test_viewset_project_contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def test_contact_get_set(db, client):

@pytest.mark.parametrize('username,password', users)
@pytest.mark.parametrize('project_id', projects)
def test_contact_post(db, client, username, password, project_id):
def test_contact_post(db, client,settings, username, password, project_id):
assert settings.PROJECT_CONTACT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to check this here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's easier to know what this test is for like that and what the feature flag does..

client.login(username=username, password=password)

url = reverse(urlnames['contact'], args=[project_id])
Expand All @@ -176,7 +177,8 @@ def test_contact_post(db, client, username, password, project_id):

@pytest.mark.parametrize('username,password', users)
@pytest.mark.parametrize('project_id', projects)
def test_contact_post_error(db, client, username, password, project_id):
def test_contact_post_error(db, client,settings, username, password, project_id):
assert settings.PROJECT_CONTACT
client.login(username=username, password=password)

url = reverse(urlnames['contact'], args=[project_id])
Expand Down