MCPcopy Create free account
hub / github.com/piccolo-orm/piccolo / test_convert_enum

Method test_convert_enum

tests/utils/test_sql_values.py:48–58  ·  view source on GitHub ↗

Make sure Enum instances are converted to their values.

(self)

Source from the content-addressed store, hash-verified

46 )
47
48 def test_convert_enum(self):
49 """
50 Make sure Enum instances are converted to their values.
51 """
52
53 class Colour(Enum):
54 red = "r"
55
56 self.assertEqual(
57 convert_to_sql_value(value=Colour.red, column=Varchar()), "r"
58 )
59
60 def test_other(self):
61 """

Callers

nothing calls this directly

Calls 3

convert_to_sql_valueFunction · 0.90
VarcharClass · 0.90
assertEqualMethod · 0.80

Tested by

no test coverage detected