Exemplo n.º 1
0
    def test_create_new_lab_location(self):
        '''This test creates a :class:`~communication.models.LabLocation` with the required information only.'''
 
        test_location = LabLocation(name = 'Memphis', 
            type='City', 
            priority=1) #repeat for all required fields
        test_location.save()
        self.assertEqual(test_location.pk, 1) #presumes no models loaded in fixture data         
Exemplo n.º 2
0
    def test_lab_location_unicode(self):
        '''This test creates a :class:`~communication.models.LabLocation` with the required information only.'''
 
        test_location = LabLocation(name = 'Memphis', 
            type='City', 
            priority=1) #repeat for all required fields
        test_location.save()
        self.assertEqual(test_location.pk, 1)
        self.assertEqual(test_location.__unicode__(), 'Memphis') 
Exemplo n.º 3
0
    def test_lab_location_unicode(self):
        '''This test creates a :class:`~communication.models.LabLocation` with the required information only.'''

        test_location = LabLocation(
            name='Memphis', type='City',
            priority=1)  #repeat for all required fields
        test_location.save()
        self.assertEqual(test_location.pk, 1)
        self.assertEqual(test_location.__unicode__(), 'Memphis')
Exemplo n.º 4
0
    def test_create_new_lab_location(self):
        '''This test creates a :class:`~communication.models.LabLocation` with the required information only.'''

        test_location = LabLocation(
            name='Memphis', type='City',
            priority=1)  #repeat for all required fields
        test_location.save()
        self.assertEqual(test_location.pk,
                         1)  #presumes no models loaded in fixture data
Exemplo n.º 5
0
    def test_create_new_lab_location_all(self):
        '''This test creates a :class:`~communication.models.LabLocation` with all fields included.'''
 
        test_location = LabLocation(name = 'Memphis', 
            type='City', 
            priority=1,
            address=Address.objects.get(pk=1),
            url = 'www.cityofmemphis.org',
            description = 'some description about the place',
            lattitude = 35.149534,
            longitude = -90.04898,) #repeat for all required fields
        test_location.save()
        self.assertEqual(test_location.pk, 1) #presumes no models loaded in fixture data
Exemplo n.º 6
0
    def test_create_new_lab_location_all(self):
        '''This test creates a :class:`~communication.models.LabLocation` with all fields included.'''

        test_location = LabLocation(
            name='Memphis',
            type='City',
            priority=1,
            address=Address.objects.get(pk=1),
            url='www.cityofmemphis.org',
            description='some description about the place',
            lattitude=35.149534,
            longitude=-90.04898,
        )  #repeat for all required fields
        test_location.save()
        self.assertEqual(test_location.pk,
                         1)  #presumes no models loaded in fixture data