Skip to content

Commit 1c00a94

Browse files
committed
fix failing tests
1 parent bf89630 commit 1c00a94

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

tests/test_cli_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_cli_create_private_invalid(mock_request_post, MockResponse):
140140
)
141141
assert result.exit_code == 2
142142
assert (
143-
"Invalid value for '--privacy' / '-p': invalid choice: invalid-privacy-value. (choose from public, private)"
143+
"Error: Invalid value for '--privacy' / '-p': 'invalid-privacy-value' is not one of 'public', 'private'."
144144
in result.output
145145
)
146146

tests/test_cli_sources.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ def side_effect(fields):
4343
add_source, ["test-user", "hello-world", "tests/fixtures/valid.ldgeojson"]
4444
)
4545
assert validated_result.exit_code == 0
46-
4746
assert (
4847
validated_result.output
49-
== """{"id": "mapbox://tileset-source/test-user/hello-world"}\n"""
48+
== """upload progress\n{"id": "mapbox://tileset-source/test-user/hello-world"}\n"""
5049
)
5150

5251

@@ -150,10 +149,9 @@ def side_effect(fields):
150149
["test-user", "hello-world", "tests/fixtures/valid.ldgeojson", "--replace"],
151150
)
152151
assert validated_result.exit_code == 0
153-
154152
assert (
155153
validated_result.output
156-
== """{"id": "mapbox://tileset-source/test-user/hello-world"}\n"""
154+
== """upload progress\n{"id": "mapbox://tileset-source/test-user/hello-world"}\n"""
157155
)
158156

159157

@@ -188,13 +186,19 @@ def side_effect(fields):
188186

189187
assert (
190188
validated_result.output
191-
== """{"id": "mapbox://tileset-source/test-user/hello-world"}\n"""
189+
== """upload progress\n{"id": "mapbox://tileset-source/test-user/hello-world"}\n"""
192190
)
193191

192+
194193
@pytest.mark.usefixtures("token_environ")
195194
def validate_source_id(self):
196-
self.assertRaises(click.BadParameter,value='mapbox://tileset-source/test-user/hello-world', param=None, ctx=None)
197-
self.assertEqual('hello-world',value='hello-world', param=None, ctx=None)
195+
self.assertRaises(
196+
click.BadParameter,
197+
value="mapbox://tileset-source/test-user/hello-world",
198+
param=None,
199+
ctx=None,
200+
)
201+
self.assertEqual("hello-world", value="hello-world", param=None, ctx=None)
198202

199203

200204
@pytest.mark.usefixtures("token_environ")

0 commit comments

Comments
 (0)