Skip to content

Commit

Permalink
computers
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges committed Oct 12, 2024
1 parent 554590e commit f76fba4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/meshapi/tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_install_number_readonly_on_create(self):
f"status code incorrect. Should be {code}, but got {response.status_code}",
)
response_obj = json.loads(response.content)
self.assertNotEquals(response_obj["install_number"], 123)
self.assertNotEqual(response_obj["install_number"], 123)

response = self.client.post(
"/api/v1/installs/",
Expand Down Expand Up @@ -234,7 +234,7 @@ def test_cant_steal_taken_install_number(self):
f"status code incorrect. Should be {code}, but got {response.status_code}",
)
response_obj = json.loads(response.content)
self.assertNotEquals(response_obj["install_number"], 1)
self.assertNotEqual(response_obj["install_number"], 1)
self.assertEqual(len(Install.objects.all()), 3)

def test_get_install_by_id(self):
Expand Down
22 changes: 11 additions & 11 deletions src/meshapi/tests/test_join_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def validate_successful_join_form_submission(test_case, test_name, s, response,
# Check if the member was created and that we see it when we
# filter for it.
existing_members = Member.objects.filter(
Q(phone_number=s.phone)
Q(phone_number=s.phone_number)
| Q(primary_email_address=s.email_address)
| Q(stripe_email_address=s.email_address)
| Q(additional_email_addresses__contains=[s.email_address])
Expand Down Expand Up @@ -100,7 +100,7 @@ def pull_apart_join_form_submission(submission):
s.street_address = submission["parsed_street_address"]
s.city = submission["parsed_city"] if "parsed_city" in submission else submission["city"]
s.state = submission["state"]
s.phone = submission["parsed_phone"]
s.phone_number = submission["parsed_phone"]

return request, s

Expand Down Expand Up @@ -379,7 +379,7 @@ def test_bad_email_join_form(self):

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

code = 400
Expand Down Expand Up @@ -418,7 +418,7 @@ def test_bad_address_join_form(self):
con = json.loads(response.content.decode("utf-8"))

self.assertEqual(
f"(NYC) Address '{form['street_address']}, {form['city']}, {form['state']} {form['zip']}' not found in geosearch.planninglabs.nyc.",
f"(NYC) Address '{form['street_address']}, {form['city']}, {form['state']} {form['zip_code']}' not found in geosearch.planninglabs.nyc.",
con["detail"],
f"Did not get correct response content for bad address join form: {response.content.decode('utf-8')}",
)
Expand Down Expand Up @@ -503,7 +503,7 @@ def test_member_moved_join_form_but_somehow_duplicate_objects_already_exist_for_
# Now test that the member can "move" and still access the join form
v_sub_2 = valid_join_form_submission.copy()
v_sub_2["street_address"] = "152 Broome Street"
v_sub_2["phone"] = "+1 555-555-5555"
v_sub_2["phone_number"] = "+1 555-555-5555"

form, s = pull_apart_join_form_submission(v_sub_2)

Expand Down Expand Up @@ -628,7 +628,7 @@ def test_member_moved_and_used_a_new_email_join_form(self):
# Now test that the member can "move" and still access the join form
# (even with a new email, provided they use the same phone number)
v_sub_2 = valid_join_form_submission.copy()
v_sub_2["email"] = "[email protected]"
v_sub_2["email_address"] = "[email protected]"
v_sub_2["street_address"] = "152 Broome Street"

form, s = pull_apart_join_form_submission(v_sub_2)
Expand Down Expand Up @@ -681,7 +681,7 @@ def test_member_moved_and_used_a_new_phone_number_join_form(self):
# Now test that the member can "move" and still access the join form
# (even with a new phone number, so long as they use the same email)
v_sub_2 = valid_join_form_submission.copy()
v_sub_2["phone"] = "+1 212-555-5555"
v_sub_2["phone_number"] = "+1 212-555-5555"
v_sub_2["street_address"] = "152 Broome Street"

form, s = pull_apart_join_form_submission(v_sub_2)
Expand Down Expand Up @@ -735,8 +735,8 @@ def test_member_moved_and_used_only_a_badly_formatted_phone_number_join_form(sel
# (even if they don't provide an email, and give a badly formatted phone number)
v_sub_2 = valid_join_form_submission.copy()
v_sub_2["street_address"] = "152 Broome Street"
v_sub_2["phone"] = "+1 5 8 5 75 8-3 425 "
v_sub_2["email"] = None
v_sub_2["phone_number"] = "+1 5 8 5 75 8-3 425 "
v_sub_2["email_address"] = None

form, s = pull_apart_join_form_submission(v_sub_2)

Expand Down Expand Up @@ -891,7 +891,7 @@ def test_member_moved_and_used_stripe_email_join_form(self):
# Now test that the member can "move", use the stripe email address,
# and we will connect it to their old registration
v_sub_2 = valid_join_form_submission.copy()
v_sub_2["email"] = "[email protected]"
v_sub_2["email_address"] = "[email protected]"
v_sub_2["street_address"] = "152 Broome Street"
v_sub_2["dob_addr_response"] = copy.deepcopy(valid_join_form_submission["dob_addr_response"])
v_sub_2["dob_addr_response"]["features"][0]["properties"]["housenumber"] = "152"
Expand Down Expand Up @@ -926,7 +926,7 @@ def test_member_moved_and_used_stripe_email_join_form(self):
# Now test that the member can "move" again, use an additional email address,
# and we will connect it to their old registration
v_sub_3 = valid_join_form_submission.copy()
v_sub_3["email"] = "[email protected]"
v_sub_3["email_address"] = "[email protected]"
v_sub_3["street_address"] = "178 Broome Street"
v_sub_3["dob_addr_response"] = copy.deepcopy(valid_join_form_submission["dob_addr_response"])
v_sub_3["dob_addr_response"]["features"][0]["properties"]["housenumber"] = "178"
Expand Down

0 comments on commit f76fba4

Please sign in to comment.