Skip to content

Commit 9c601ff

Browse files
committed
better smoke test
1 parent b7df2b8 commit 9c601ff

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

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