Skip to content

Commit

Permalink
Test nyc join form but nj zip
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges committed Oct 13, 2024
1 parent adcb98a commit af4203f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/meshapi/tests/test_join_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,24 @@ def test_new_jersey_but_nyc_zip_join_form(self):
f"status code incorrect for Non NYC Join Form. Should be {code}, but got {response.status_code}.\n Response is: {response.content.decode('utf-8')}",
)

def test_nyc_join_form_but_new_jersey_zip(self):
self.requests_mocker.get(
NYC_PLANNING_LABS_GEOCODE_URL,
json=valid_join_form_submission["dob_addr_response"],
)

# Name, email, phone, location, apt, rooftop, referral
form, _ = pull_apart_join_form_submission(valid_join_form_submission)
form["zip_code"] = "07030"
response = self.c.post("/api/v1/join/", form, content_type="application/json")

code = 400
self.assertEqual(
code,
response.status_code,
f"status code incorrect for Non NYC Join Form. Should be {code}, but got {response.status_code}.\n Response is: {response.content.decode('utf-8')}",
)

def test_empty_join_form(self):
self.requests_mocker.get(
NYC_PLANNING_LABS_GEOCODE_URL,
Expand Down

0 comments on commit af4203f

Please sign in to comment.