Beispiel #1
0
 def test_duplicates_overwrite_eachother(self):
     HouseCode.objects.create(code="FA-32")
     house_code = HouseCode(code="FA-32")
     house_code.save()
     self.assertEqual(len(HouseCode.objects.all()), 1)
Beispiel #2
0
    def test_overwrite_doesn_not_error_when_no_existing_house_code(self):

        hc1 = HouseCode(code='FA-32')
        hc1.save(overwrite=True)
Beispiel #3
0
    def test_save_can_overwrite(self):

        hc1 = HouseCode.objects.create(code='FA-32')
        hc2 = HouseCode(code='FA-32')
        hc2.save(overwrite=True)
Beispiel #4
0
 def test_duplicates_overwrite_eachother(self):
     HouseCode.objects.create(code="FA-32")
     house_code = HouseCode(code="FA-32")
     house_code.save()
     self.assertEqual(len(HouseCode.objects.all()), 1)
Beispiel #5
0
    def test_overwrite_doesn_not_error_when_no_existing_house_code(self):

        hc1 = HouseCode(code='FA-32')
        hc1.save(overwrite=True)
Beispiel #6
0
    def test_save_can_overwrite(self):

        hc1 = HouseCode.objects.create(code='FA-32')
        hc2 = HouseCode(code='FA-32')
        hc2.save(overwrite=True)