Fixed travis to run lint instead of pep8 and moved test reqs to own file
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ matrix:
|
||||
- python: "3.4.2"
|
||||
env: TOXENV=py34
|
||||
- python: "3.4.2"
|
||||
env: TOXENV=pep8
|
||||
env: TOXENV=lint
|
||||
- python: "3.5"
|
||||
env: TOXENV=py35
|
||||
- python: "3.6"
|
||||
|
||||
+1
-2
@@ -422,12 +422,11 @@ class Blink(object):
|
||||
|
||||
def get_auth_token(self):
|
||||
"""Retrieves the authentication token from Blink"""
|
||||
|
||||
if not isinstance(self._username, str):
|
||||
raise BlinkAuthenticationException(ERROR.USERNAME)
|
||||
if not isinstance(self._password, str):
|
||||
raise BlinkAuthenticationException(ERROR.PASSWORD)
|
||||
|
||||
|
||||
headers = {'Host': DEFAULT_URL,
|
||||
'Content-Type': 'application/json'}
|
||||
data = json.dumps({
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
flake8==3.3
|
||||
pylint==1.6.5
|
||||
pydocstyle==1.1.1
|
||||
@@ -7,7 +7,7 @@ import constants as const
|
||||
USERNAME = 'foobar'
|
||||
PASSWORD = 'deadbeef'
|
||||
|
||||
class TestBlinkSystem(unittest.TestCase):
|
||||
class TestBlinkSetup(unittest.TestCase):
|
||||
"""Test the Blink class in blinkpy."""
|
||||
def test_initialization(self):
|
||||
"""Verify we can initialize blink."""
|
||||
@@ -38,4 +38,6 @@ class TestBlinkSystem(unittest.TestCase):
|
||||
blink.login()
|
||||
self.assertEqual(blink._username, USERNAME)
|
||||
self.assertEqual(blink._password, PASSWORD)
|
||||
|
||||
# NEXT NEED ACTUAL REQUEST TESTS
|
||||
|
||||
@@ -10,13 +10,12 @@ commands =
|
||||
py.test -v --timeout=30 --duration=10 --cov=blinkpy --cov-report html {posargs}
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/requirements_test.txt
|
||||
|
||||
[testenv:lint]
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
flake8
|
||||
pydocstyle
|
||||
pylint
|
||||
-r{toxinidir}/requirements_test.txt
|
||||
basepython = python3
|
||||
ignore_errors = True
|
||||
commands =
|
||||
|
||||
Reference in New Issue
Block a user