Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Oct 26, 2016
1 parent 4a73827 commit 629de72
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -49,3 +49,4 @@ docs/_build
/.ropeproject
/.env
/env
/.cache
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -9,4 +9,4 @@ branches:

install: pip install -r requirements-tests.txt

script: py.test tests.py
script: py.test test_aioauth_client.py
9 changes: 3 additions & 6 deletions Makefile
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -7,7 +7,7 @@ ignore = E731,D211,D213
[pylama:setup.py]
ignore=D

[pylama:tests.py]
[pylama:test_*.py]
ignore=D

[pytest]
Expand Down
6 changes: 3 additions & 3 deletions tests.py → test_aioauth_client.py
Expand Up @@ -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',
Expand All @@ -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
Expand All @@ -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',
Expand Down

0 comments on commit 629de72

Please sign in to comment.