def test_skip_fields_with_default(self):
     dummy = baker.make(models.DummyDefaultFieldsModel)
     assert dummy.default_char_field == "default"
     assert dummy.default_text_field == "default"
     assert dummy.default_int_field == 123
     assert dummy.default_float_field == 123.0
     assert dummy.default_date_field == "2012-01-01"
     assert dummy.default_date_time_field == smart_datetime(2012, 1, 1)
     assert dummy.default_time_field == "00:00:00"
     assert dummy.default_decimal_field == Decimal("0")
     assert dummy.default_email_field == "*****@*****.**"
     assert dummy.default_slug_field == "a-slug"
示例#2
0
 def test_skip_fields_with_default(self):
     dummy = baker.make(models.DummyDefaultFieldsModel)
     assert dummy.default_char_field == 'default'
     assert dummy.default_text_field == 'default'
     assert dummy.default_int_field == 123
     assert dummy.default_float_field == 123.0
     assert dummy.default_date_field == '2012-01-01'
     assert dummy.default_date_time_field == smart_datetime(2012, 1, 1)
     assert dummy.default_time_field == '00:00:00'
     assert dummy.default_decimal_field == Decimal('0')
     assert dummy.default_email_field == '*****@*****.**'
     assert dummy.default_slug_field == 'a-slug'