Example #1
0
 def test_save_with_no_user_existing_record(self):
     start = HasherDataModel('hasher1',
                             mother_kennel=self.kennel,
                             hash_name=self.name)
     start.save()
     hasher = HasherDataModel('hasher1',
                              mother_kennel=self.kennel,
                              hash_name=self.name,
                              user='******')
     hasher.save()
     self.assertTrue(HasherDataModel.record_exists(start))
     self.assertTrue(HasherDataModel.record_exists(hasher))
Example #2
0
 def test_save_same_record_twice(self):
     start = HasherDataModel('hasher1',
                             mother_kennel=self.kennel,
                             hash_name=self.name)
     start.save()
     start.save()
     self.assertTrue(HasherDataModel.record_exists(start))
Example #3
0
 def test_record_exists(self):
     hasher = HasherDataModel(self.hasher_id,
                              mother_kennel=self.kennel,
                              hash_name=self.name,
                              user=self.user)
     hasher.save()
     self.assertTrue(HasherDataModel.record_exists(hasher))
Example #4
0
 def test_record_does_not_exist(self):
     hasher = HasherDataModel(self.hasher_id,
                              mother_kennel=self.kennel,
                              hash_name=self.name,
                              user=self.user)
     self.assertFalse(HasherDataModel.record_exists(hasher))