def test_view_logs_loop_and_edit_all(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) logs = Log.select() self.assertEqual(logs[0].date, '03/03/3000') self.assertEqual(logs[0].employee_name, 'Gamma') self.assertEqual(logs[0].task_name, 'Task Three') self.assertEqual(logs[0].time_spent, 3) self.assertEqual(logs[0].note, 'Thryee')
def test_view_logs_loop_and_edit_note(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) self.assertEqual(Log.select()[0].note, 'Thryee')
def test_view_logs_loop_and_edit_time_spent(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) self.assertEqual(Log.select()[0].time_spent, 3)
def test_view_logs_loop_and_edit_task_name(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) self.assertEqual(Log.select()[0].task_name, 'Task Three')
def test_view_logs_loop_and_edit_employee_name(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) self.assertEqual(Log.select()[0].employee_name, 'Gamma')
def test_view_logs_loop_and_edit_date(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) self.assertEqual(Log.select()[0].date, '03/03/3000')
def test_view_logs_loop_delete_disconfirm(self, input): from work_logs_sqlite import view_logs_loop logs = Log.select() view_logs_loop(logs) assert len(Log.select()) == 2