Skip to content

Commit 20192c4

Browse files
committed
test: use English values in the Enum tests
1 parent 8767326 commit 20192c4

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎tests/test_enum.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020

2121
class Color(enum.Enum):
22-
Red = "Rouge"
23-
blue = "bleu"
24-
Green = "Vert"
22+
Red = "Crimson"
23+
blue = "azure"
24+
Green = "Emerald"
2525

2626

2727
class Base(DeclarativeBase):
@@ -91,9 +91,9 @@ def storage(database_url, storage_factory, user_type):
9191
engine.dispose()
9292
storage = storage_factory(mappings={"User": COLORED_USERS})
9393
for user_name, title, external_id in [
94-
("a", "Red", "Rouge"),
95-
("b", "blue", "bleu"),
96-
("c", "Green", "Vert"),
94+
("a", "Red", "Crimson"),
95+
("b", "blue", "azure"),
96+
("c", "Green", "Emerald"),
9797
("d", None, None),
9898
]:
9999
emails = [{"value": f"{user_name}@example.org", "type": title}]
@@ -119,7 +119,7 @@ def test_an_enumerated_column_reads_back_the_string_it_stores(storage, user_type
119119
_, (user,) = storage.search([user_type], SearchRequest(filter='userName eq "a"'))
120120

121121
assert user.title == "Red"
122-
assert user.external_id == "Rouge"
122+
assert user.external_id == "Crimson"
123123
assert user.emails[0].type == "Red"
124124

125125

@@ -128,13 +128,13 @@ def test_an_enumerated_column_reads_back_the_string_it_stores(storage, user_type
128128
[
129129
('title eq "blue"', ["b"]),
130130
('title eq "BLUE"', ["b"]),
131-
('title eq "bleu"', []),
131+
('title eq "azure"', []),
132132
('title gt "h"', ["a"]),
133133
('title co "e"', ["a", "b", "c"]),
134134
("title pr", ["a", "b", "c"]),
135-
('externalId eq "bleu"', ["b"]),
136-
('externalId eq "Bleu"', []),
137-
('externalId gt "S"', ["b", "c"]),
135+
('externalId eq "azure"', ["b"]),
136+
('externalId eq "Azure"', []),
137+
('externalId gt "D"', ["b", "c"]),
138138
('emails[type eq "green"]', ["c"]),
139139
("emails.type pr", ["a", "b", "c"]),
140140
],
@@ -168,7 +168,7 @@ def test_an_enumerated_column_sorts_on_the_string_it_stores(
168168
"user",
169169
[
170170
User(user_name="e", title="Purple"),
171-
User(user_name="e", title="Rouge"),
171+
User(user_name="e", title="Crimson"),
172172
User(user_name="e", external_id="Red"),
173173
User(user_name="e", emails=[{"value": "e@example.org", "type": "Purple"}]),
174174
],

0 commit comments

Comments
 (0)