-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
11 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,8 @@ class TestUserPage: | |
|
||
username = "test_username" | ||
phone = "012-345-6789" | ||
invalid_phone = "123-3421-322" | ||
password = "newpassword1234" | ||
invalid_password = "inv2341" | ||
email = "[email protected]" | ||
invalid_email = "testemail@" | ||
userpage = None | ||
main_page_staging = MainPageStaging() | ||
|
||
|
@@ -41,6 +38,14 @@ def insert_users(self, cursor: sqlite3.Cursor, connection: sqlite3.Connection): | |
) | ||
connection.commit() | ||
|
||
@use_test | ||
def test_invalid_input(self): | ||
"""invalid input returns False""" | ||
self.initialize() | ||
assert self.userpage.update_password("inv2341") is False | ||
assert self.userpage.update_email("testemail@") is False | ||
assert self.userpage.update_phone("123-3421-322") is False | ||
|
||
@use_test | ||
def test_get_user(self): | ||
"""get_user returns correct Use""" | ||
|
@@ -86,14 +91,6 @@ def test_valid_email(self): | |
self.cleanup_db() | ||
assert test_result == self.email | ||
|
||
@use_test | ||
def test_invalid_input(self): | ||
"""invalid input returns False""" | ||
self.initialize() | ||
assert self.userpage.update_password(self.invalid_password) is False | ||
assert self.userpage.update_email(self.invalid_email) is False | ||
assert self.userpage.update_phone(self.invalid_phone) is False | ||
|
||
@use_test | ||
def test_valid_phone(self): | ||
"""update_phone returns True and db entry is correct""" | ||
|
a9466d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
a9466d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
a9466d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report