Exemplo n.º 1
0
 def testDefaultValue(self):
     """
     Default value should be empty and fetchable
     """
     model_test = TestNullableModel()
     model_test.save()
     model_test = TestNullableModel.objects.get(id__exact=model_test.id)
     self.assertEquals(None, model_test.duration_field)
     model_test.delete()
Exemplo n.º 2
0
    def testDefaultValue(self):
        """
        Default value should be empty and fetchable
        """
        model_test = TestNullableModel()
        model_test.save()
        model_test_saved = TestNullableModel.objects.get(pk=model_test.pk)

        self.assertEquals(model_test.duration_field, None)
        self.assertEquals(model_test_saved.duration_field, None)
Exemplo n.º 3
0
 def testDefaultValue(self):
     """
     Default value should be empty and fetchable
     """
     model_test = TestNullableModel()
     model_test.save()
     model_test = TestNullableModel.objects.get(id__exact=model_test.id)
     self.assertEquals(None, model_test.duration_field)
     model_test.delete()