diff --git a/.gitignore b/.gitignore index ab44add..f920e74 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ docs/_build /.ropeproject /.env /env +/.cache diff --git a/.travis.yml b/.travis.yml index 8328b66..d57c46b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ branches: install: pip install -r requirements-tests.txt -script: py.test tests.py +script: py.test test_aioauth_client.py diff --git a/Makefile b/Makefile index 78d534d..a1a2243 100644 --- a/Makefile +++ b/Makefile @@ -71,13 +71,10 @@ $(VIRTUAL_ENV)/bin/py.test: $(VIRTUAL_ENV) requirements-tests.txt @$(VIRTUAL_ENV)/bin/pip install -r requirements-tests.txt @touch $(VIRTUAL_ENV)/bin/py.test -.PHONY: test +.PHONY: t test # target: test - Runs tests -test: $(VIRTUAL_ENV)/bin/py.test - @$(VIRTUAL_ENV)/bin/py.test -xs tests.py - -.PHONY: t -t: test +t test: $(VIRTUAL_ENV)/bin/py.test + @$(VIRTUAL_ENV)/bin/py.test -xs test_aioauth_client.py .PHONY: run run: $(VIRTUAL_ENV)/bin/py.test diff --git a/setup.cfg b/setup.cfg index 16936e2..d44974a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ ignore = E731,D211,D213 [pylama:setup.py] ignore=D -[pylama:tests.py] +[pylama:test_*.py] ignore=D [pytest] diff --git a/tests.py b/test_aioauth_client.py similarity index 91% rename from tests.py rename to test_aioauth_client.py index 7b67347..1843479 100644 --- a/tests.py +++ b/test_aioauth_client.py @@ -8,7 +8,7 @@ def loop(): return asyncio.get_event_loop() -def test_oauth1(loop): +def test_oauth1(loop): # noqa twitter = TwitterClient( consumer_key='oUXo1M7q1rlsPXm4ER3dWnMt8', consumer_secret='YWzEvXZJO9PI6f9w2FtwUJenMvy9SPLrHOvnNkVkc5LdYjKKup', @@ -18,7 +18,7 @@ def test_oauth1(loop): assert 'twitter' in ClientRegistry.clients coro = twitter.get_request_token(oauth_callback='http://fuf.me:5000/twitter') - rtoken, rsecret = loop.run_until_complete(coro) + rtoken, rsecret, _ = loop.run_until_complete(coro) assert rtoken assert rsecret assert twitter.oauth_token == rtoken @@ -32,7 +32,7 @@ def test_oauth1(loop): loop.run_until_complete(coro) -def test_oauth2(loop): +def test_oauth2(loop): # noqa github = GithubClient( client_id='b6281b6fe88fa4c313e6', client_secret='21ff23d9f1cad775daee6a38d230e1ee05b04f7c',