예제 #1
0
파일: tests.py 프로젝트: BridgesLab/mousedb
    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  
예제 #2
0
파일: tests.py 프로젝트: BridgesLab/mousedb
    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")
예제 #3
0
파일: tests.py 프로젝트: BridgesLab/mousedb
    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")  
예제 #4
0
파일: tests.py 프로젝트: BridgesLab/mousedb
    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