Skip to content

Commit 9a4c79c

Browse files
committed
test(backend): fix tests using hashtags list --> string
1 parent 2e05199 commit 9a4c79c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/backend/tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def project(db, admin_user, organisation):
134134
odk_central_url=os.getenv("ODK_CENTRAL_URL"),
135135
odk_central_user=os.getenv("ODK_CENTRAL_USER"),
136136
odk_central_password=os.getenv("ODK_CENTRAL_PASSWD"),
137-
hashtags=["hot-fmtm"],
137+
hashtags="hashtag1 hashtag2",
138138
outline_geojson=Polygon(
139139
type="Polygon",
140140
coordinates=[

src/backend/tests/test_projects_routes.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def test_create_project(client, admin_user, organisation):
5757
"description": "test",
5858
},
5959
"xform_category": "buildings",
60-
"hashtags": ["#FMTM"],
60+
"hashtags": "#FMTM",
6161
"outline_geojson": {
6262
"coordinates": [
6363
[
@@ -283,8 +283,8 @@ async def test_update_project(client, admin_user, project):
283283
"short_description": "updated short description",
284284
"description": "updated description",
285285
},
286-
"xform_category": "buildings",
287-
"hashtags": ["#FMTM"],
286+
"xform_category": "healthcare",
287+
"hashtags": "#FMTM anothertag",
288288
"outline_geojson": {
289289
"coordinates": [
290290
[
@@ -320,6 +320,9 @@ async def test_update_project(client, admin_user, project):
320320
== updated_project_data["project_info"]["description"]
321321
)
322322

323+
assert response_data["xform_category"] == "healthcare"
324+
assert response_data["hashtags"] == ["#FMTM", "#anothertag"]
325+
323326

324327
if __name__ == "__main__":
325328
"""Main func if file invoked directly."""

0 commit comments

Comments
 (0)