コード例 #1
0
    def testNullValue(self):

        request = api.addMedication(None)
        self.assertEqual(testDatabase.Medication.select().count(), 0)
コード例 #2
0
    def testLegitimate(self):

        request = api.addMedication("test")
        #'name' should be 'medicationName' but it errors
        self.assertEqual(request, "Added test")
        self.assertEqual(testDatabase.Medication.select().count(), 1)