Skip to content

Commit

Permalink
feat: used mocking in the correct location
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-hd committed Oct 25, 2024
1 parent 8ff11df commit 43d7eba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/functional/test_create_community_gis_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@ def fill_out_and_submit_account_creation_form(self):
self.py.get("[name='contact_name']").type('Test User')
self.py.get("#communityContactEmailField").type('Test@test.com')

# submit form
self.py.get(".primary-btn").click()
# bypass validate_recaptcha on the backend when clicking this button
with patch('communities.views.validate_recaptcha') as mock_validate_recaptcha:
mock_validate_recaptcha.return_value = True
self.py.get(".primary-btn").click()
time.sleep(5)

def select_native_land_method_and_submit(self):
# pick NLD add boundary radio button
self.py.get(f"[data-next='{self.select_nld_add_boundary_method_path}']").click()

# bypass validate_recaptcha on the backend when clicking this button
with patch('communities.views.validate_recaptcha') as mock_validate_recaptcha:
mock_validate_recaptcha.return_value = True
self.py.get(".primary-btn").click()
time.sleep(10)
# click continue button
self.py.get(".primary-btn").click()

def select_upload_shapefile_and_submit(self):
# pick upload shapefile radio button
self.py.get(f"[data-next='{self.select_upload_boundary_file_method_path}']").click()

# submit form
# click continue button
self.py.get(".primary-btn").click()

def select_specific_nld_territory(self, nld_terriroty: str):
Expand Down

0 comments on commit 43d7eba

Please sign in to comment.