def test_get_default_returns_Bin_from_bytes(self): field = BinaryField(null=True) self.patch(field, "default", b"wotcha") self.assertEqual(Bin(b"wotcha"), field.get_default())
def test_get_default_returns_None(self): field = BinaryField(null=True) self.patch(field, "default", None) self.assertIsNone(field.get_default())
def test_get_default_returns_None(self): field = BinaryField(null=True) self.patch(field, "default", None) self.assertIsNone(field.get_default())
def test_get_default_returns_Bin_from_bytes(self): field = BinaryField(null=True) self.patch(field, "default", b"wotcha") self.assertEqual(Bin(b"wotcha"), field.get_default())