def test_test_medical_treatment_absolute_url(self): '''This tests the absolute_url generation of a :class:`~mousedb.veterinary.models.MedicalTreatment`.''' test_medical_treatment = MedicalTreatment(name = "Test Treatment") test_medical_treatment.save() self.assertEqual(test_medical_treatment.get_absolute_url(), "/veterinary/medical-treatment/test-treatment") #where the url should be
def test_test_medical_treatment_unicode(self): '''This tests the unicode representation of a :class:`~mousedb.veterinary.models.MedicalTreatment`.''' test_medical_treatment = MedicalTreatment(name = "Test Treatment") test_medical_treatment.save() self.assertEqual(test_medical_treatment.__unicode__(), "Test Treatment")
def test_test_medical_treatment_name_slug(self): '''This tests the slug field generation of a :class:`~mousedb.veterinary.models.MedicalTreatment`.''' test_medical_treatment = MedicalTreatment(name = "Test Treatment") test_medical_treatment.save() self.assertEqual(test_medical_treatment.slug, "test-treatment")
def test_create_new_test_medical_treatment_all(self): '''This test creates a :class:`~mousedb.veterinary.models.MedicalTreatment` with all information entered.''' test_medical_treatment = MedicalTreatment(name = "Test Treatment") test_medical_treatment.save() self.assertEqual(test_medical_treatment.pk, 1) #presumes one model loaded in fixture data