Fakultas Ilmu Komputer UI

Commit 0c1b0000 authored by Dave Nathanael's avatar Dave Nathanael
Browse files

[GREEN] Fix test with invalid phone number

parent 4d7d7547
Pipeline #47241 passed with stages
in 3 minutes
......@@ -215,21 +215,23 @@ class AccountViewTest(APITestCase):
"id": str(self.officer.id),
"name": self.faker.name(),
"email": self.faker.email(),
"phone_number": self.faker.phone_number(),
"phone_number": "+999999999999",
"area": self.faker.city(),
"is_admin": False,
"is_verified": True,
"is_active": False,
"is_active": True,
}
prev_outbox_count = len(mail.outbox)
self.client = APIClient(HTTP_AUTHORIZATION=HEADER_PREFIX + self.token_2.key)
response = self.client.put(path=url, data=data, format="json",)
data["is_active"] = False
response = self.client.put(path=url, data=data, format="json",)
current_outbox_count = len(mail.outbox)
# Account deactivation email sent
self.assertEqual(current_outbox_count, prev_outbox_count + 1)
self.assertEqual(current_outbox_count, prev_outbox_count + 2)
def test_edit_account_fail_without_complete_fields(self):
url = self.BASE_URL + str(self.officer.id) + "/"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment