Skip to content

Commit

Permalink
Fix username and password
Browse files Browse the repository at this point in the history
  • Loading branch information
Waariss committed Nov 28, 2023
1 parent 3eceff6 commit 61cf3f1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Project_phase_2/tests/Unit_Test_Cases/Unit_Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def test_regis_fail(self):
app, db, User = import_app_modules()
random_phone_suffix = random.randint(100000, 999999)
response = self.client.post('/register', data=dict(
username="testuser",
password="testpass",
username="m",
password="1",
phone_number=f"1111{random_phone_suffix}"
), follow_redirects=True)
user = User.query.filter_by(username="testuser").first()
Expand All @@ -78,8 +78,8 @@ def test_regis_fail(self):
def test_login(self):
with self.client:
response = self.client.post('/login', data=dict(
username='testuser',
password='testpass'
username='m',
password='1'
), follow_redirects=True)
self.assertEqual(response.status_code, 200)
self.assertTrue(current_user.is_authenticated)
Expand Down Expand Up @@ -164,8 +164,8 @@ def test_translate(self):
def test_profile_update(self):
with self.client:
response = self.client.post('/login', data=dict(
username='testuser',
password='testpass'
username='m',
password='1'
), follow_redirects=True)
new_language = 'en'
new_phone = '9876543210'
Expand All @@ -174,5 +174,4 @@ def test_profile_update(self):

), follow_redirects=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(current_user.phone_number, new_phone)

self.assertEqual(current_user.phone_number, new_phone)

0 comments on commit 61cf3f1

Please sign in to comment.