Example #1
0
 def test_update(self):
     """Verify the object attributes can be updated using a dict."""
     obj = Protocol()
     obj.__dict__.update({
         'slug': 'protocol',
         'name_en': 'protocol',
     })
     obj.save()
Example #2
0
 def test_name(self):
     """verify the localized name is set once the object is saved."""
     obj = Protocol(slug='protocol', name_en='protocol')
     obj.save()
     self.assertEqual('protocol', obj.name)
Example #3
0
 def test_representation(self):
     """Verify the object can be displayed in a foreign key field."""
     obj = Protocol(slug='protocol', name_en='protocol')
     obj.save()
     self.assertTrue(unicode(obj))