Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmiller committed Oct 5, 2022
1 parent 224006c commit a0228df
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dataworkspace/dataworkspace/tests/request_access/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_user_redirected_to_confirmation_page_after_form_submission(
def test_helpdesk_ticket_created_after_form_submission(
self,
mock_upload_to_clamav,
helpdesk_create_ticket,
mock_helpdesk_create_ticket,
client,
user,
metadata_db,
Expand All @@ -105,7 +105,7 @@ class MockTicket:
def id(self):
return 1

helpdesk_create_ticket.return_value = MockTicket()
mock_helpdesk_create_ticket.return_value = MockTicket()

mock_upload_to_clamav.return_value = ClamAVResponse({"malware": False})

Expand Down Expand Up @@ -138,8 +138,8 @@ def id(self):
follow=True,
)

assert len(helpdesk_create_ticket.call_args_list) == 1
call_args, _ = helpdesk_create_ticket.call_args_list[0]
assert len(mock_helpdesk_create_ticket.call_args_list) == 1
call_args, _ = mock_helpdesk_create_ticket.call_args_list[0]
ticket = call_args[0]

assert ticket.subject == "Access Request for A master"
Expand Down Expand Up @@ -295,7 +295,7 @@ def test_user_redirected_to_summary_page_after_step_3_form_submission(
def test_helpdesk_ticket_created_after_form_submission(
self,
mock_upload_to_clamav,
helpdesk_create_ticket,
mock_helpdesk_create_ticket,
mock_boto,
client,
metadata_db,
Expand All @@ -306,7 +306,7 @@ class MockTicket:
def id(self):
return 1

helpdesk_create_ticket.return_value = MockTicket()
mock_helpdesk_create_ticket.return_value = MockTicket()

mock_upload_to_clamav.return_value = ClamAVResponse({"malware": False})

Expand All @@ -329,8 +329,8 @@ def id(self):
follow=True,
)

assert len(helpdesk_create_ticket.call_args_list) == 1
call_args, _ = helpdesk_create_ticket.call_args_list[0]
assert len(mock_helpdesk_create_ticket.call_args_list) == 1
call_args, _ = mock_helpdesk_create_ticket.call_args_list[0]
ticket = call_args[0]

assert ticket.subject == "Access Request for A master"
Expand Down

0 comments on commit a0228df

Please sign in to comment.