def setup_class(self): """ This method is called before the testing logic runs to correctly set up the class. In this case, it initialises a test database. """ try: init_db(test_db_name) except sqlite3.OperationalError: pass
def setup_class(self): """ Sets up the class for testing. This method is called before the testing methods in order to correctly set up the class - in this case opening a connection with a test internal database. """ try: init_db(test_db_name) except sqlite3.OperationalError: pass