コード例 #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')
コード例 #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')
コード例 #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)
コード例 #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')
コード例 #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')
コード例 #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')
コード例 #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