예제 #1
0
    def testNotToday(self):
        """Attempt to create a reminder when one should not be created"""
        api.addReminders('patient2', datetime.datetime.now())

        self.assertEqual(testDatabase.Reminder.select().where(testDatabase.Reminder.username == 'patient2').count(),0)
예제 #2
0
 def testLegitimate(self):
     """Attempt to create a reminder"""
     api.addReminders('patient', datetime.datetime.now())
     
     self.assertEqual(testDatabase.Reminder.select().where(testDatabase.Reminder.username == 'patient').count(),2)