Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.76 KB | None | 0 0
  1. # Imports
  2. from tkinter import *
  3. import unittest
  4. from logon_gui import GuiManager
  5. from database import My_Database
  6.  
  7.  
  8. # classes
  9. class TestGuiManager(unittest.TestCase):
  10.     def test_attempt_login_with_correct_credentials(self):
  11.         # Arrange
  12.         the_one_tk = Tk()
  13.         database = My_Database('timetabler.db')
  14.         my_login = GuiManager(the_one_tk, database)
  15.         my_login.username_input.insert(0, "student")
  16.         my_login.password_input.insert(0, "student1")
  17.         my_login.selected.get()
  18.         database.set_login_gui(my_login)
  19.         my_login.display_login_window()
  20.         my_login.finalise()
  21.  
  22.         # Act
  23.  
  24.         my_login.attempt_login()
  25.  
  26.         # Assert
  27.         self.fail()
  28.  
  29. if __name__ == "__main__":
  30.     unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement