File tree Expand file tree Collapse file tree 6 files changed +31
-1
lines changed Expand file tree Collapse file tree 6 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ pipfile-requirements = "*"
99pylint = " *"
1010
1111[packages ]
12+ requests = " *"
1213
1314[requires ]
1415python_version = " 3.6"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pipenv install --dev
1717Run tests in pipenv environment:
1818
1919``` shell
20- pipenv run pytest
20+ pipenv run python3 -m pytest
2121```
2222
2323Tests require a SCUTTLE API key with full permissions. This key should be the
Original file line number Diff line number Diff line change 1+ from .wrapper import scuttle
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ """Provides generic methods for accessing version 1 of the API."""
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ """Provides methods to interface with a given API instance."""
4+
5+ import requests
6+
7+ def scuttle (wiki , api_version = None ):
8+ """Create a new API wrapper for a given wiki and API version.
9+
10+ str `wiki`: The domain of the wiki.
11+ int `api_version`: The version of the API to use. If not provided, defaults
12+ to latest.
13+ """
14+
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ import pytest
4+ import scuttle
5+
6+ TOKEN = None
7+ with open ("token.secret.txt" , 'r' ) as token_file :
8+ TOKEN = token_file .readline ().strip ()
9+
10+ def test_something ():
11+ wiki = scuttle .scuttle ('en' , 1 )
You can’t perform that action at this time.
0 commit comments