Skip to content

Commit 115fa5c

Browse files
committed
Actually test that first name search works
1 parent 9c2e63d commit 115fa5c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pgcommitfest/commitfest/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def alice():
2424
def bob():
2525
"""Create test user Bob."""
2626
return User.objects.create_user(
27-
username="bob",
27+
username="b",
2828
first_name="Bob",
2929
last_name="Brown",
3030

pgcommitfest/commitfest/tests/test_lookups.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_userlookup_with_cf_includes_reviewers(
123123
"values": [
124124
{
125125
"id": bob.id,
126-
"value": "Bob Brown (bob)",
126+
"value": "Bob Brown (b)",
127127
}
128128
]
129129
}
@@ -163,16 +163,16 @@ def test_userlookup_requires_query_parameter(client, commitfests):
163163
assert response.status_code == 404
164164

165165

166-
def test_userlookup_searches_first_name(client, alice, open_cf, patches_with_users):
166+
def test_userlookup_searches_first_name(client, bob, open_cf, patches_with_users):
167167
"""Test that userlookup searches by first name."""
168-
response = client.get("/lookups/user/", {"query": "Alice", "cf": open_cf.id})
168+
response = client.get("/lookups/user/", {"query": "Bob", "cf": open_cf.id})
169169

170170
assert response.status_code == 200
171171
assert json.loads(response.content) == {
172172
"values": [
173173
{
174-
"id": alice.id,
175-
"value": "Alice Anderson (alice)",
174+
"id": bob.id,
175+
"value": "Bob Brown (b)",
176176
}
177177
]
178178
}
@@ -187,7 +187,7 @@ def test_userlookup_searches_last_name(client, bob, open_cf, patches_with_users)
187187
"values": [
188188
{
189189
"id": bob.id,
190-
"value": "Bob Brown (bob)",
190+
"value": "Bob Brown (b)",
191191
}
192192
]
193193
}

0 commit comments

Comments
 (0)