Skip to content

Commit 1f0bc6e

Browse files
committed
Improved test with token handling
1 parent 530722c commit 1f0bc6e

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ var/
1717
*.egg
1818
logs/
1919
__pycache__/
20-
.pytest_cache/
20+
.pytest_cache/
21+
token.py

tests/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""Test for Geocaching Api integration."""
22
from geocachingapi import GeocachingApi, GeocachingStatus
3+
#For adding your token add a file call token.py to current folder and add TOKEN = "<your token here>"
4+
from .token import TOKEN
35
import asyncio
46
import pytest
57

68
@pytest.mark.asyncio
79
async def test():
810
status:GeocachingStatus = None
9-
token = "<insert token here>"
10-
api = GeocachingApi(token=token)
11+
api = GeocachingApi(token=TOKEN)
1112
status = await api.update()
12-
print(status.user.username)
1313
assert(status.user.username is not None)

0 commit comments

Comments
 (0)