Skip to content

Commit e963da4

Browse files
committed
better smoke test
1 parent b7df2b8 commit e963da4

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131

3232
# check that basic features work and we didn't miss to include crucial files
3333
- name: Smoke test (wheel)
34-
run: uv run --isolated --no-project --with dist/*.whl tests/unit_tests/test_client.py
34+
run: uv run --isolated --no-project --with dist/*.whl --with "responses==0.25.8" tests/smoke.py
3535

3636
- name: Smoke test (source distribution)
37-
run: uv run --isolated --no-project --with dist/*.tar.gz tests/unit_tests/test_client.py
37+
run: uv run --isolated --no-project --with dist/*.tar.gz --with "responses==0.25.8" tests/smoke.py
3838

3939
# we use Trusted publishing, no keys necessary: https://docs.astral.sh/uv/guides/integration/github/#publishing-to-pypi
4040
- name: Publish

tests/smoke.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import responses
2+
3+
from verda import VerdaClient
4+
5+
BASE_URL = 'https://example.com'
6+
7+
8+
@responses.activate()
9+
def main():
10+
responses.add(
11+
responses.POST,
12+
f'{BASE_URL}/oauth2/token',
13+
json={
14+
'access_token': 'dummy',
15+
'token_type': 'Bearer',
16+
'refresh_token': 'dummy',
17+
'scope': 'fullAccess',
18+
'expires_in': 3600,
19+
},
20+
status=200,
21+
)
22+
23+
client = VerdaClient('id', 'secret', BASE_URL)
24+
assert client.constants.base_url == BASE_URL
25+
26+
27+
if __name__ == '__main__':
28+
main()

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)