Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Imports
- from tkinter import *
- import unittest
- from logon_gui import GuiManager
- from database import My_Database
- # classes
- class TestGuiManager(unittest.TestCase):
- def test_attempt_login_with_correct_credentials(self):
- # Arrange
- the_one_tk = Tk()
- database = My_Database('timetabler.db')
- my_login = GuiManager(the_one_tk, database)
- my_login.username_input.insert(0, "student")
- my_login.password_input.insert(0, "student1")
- my_login.selected.get()
- database.set_login_gui(my_login)
- my_login.display_login_window()
- my_login.finalise()
- # Act
- my_login.attempt_login()
- # Assert
- self.fail()
- if __name__ == "__main__":
- unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement