Exemplo n.º 1
0
 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')
Exemplo n.º 2
0
 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')
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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')
Exemplo n.º 5
0
 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')
Exemplo n.º 6
0
 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')
Exemplo n.º 7
0
 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