Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37350da1b2 | ||
|
|
19b7eef123 | ||
|
|
6bd8d14190 | ||
|
|
f6ddfbe5cf | ||
|
|
1b66eddfb4 |
+2
-3
@@ -1,5 +1,5 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
daysUntilStale: 60
|
||||
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
@@ -8,8 +8,7 @@ daysUntilClose: 7
|
||||
exemptLabels:
|
||||
- Priority
|
||||
- bug
|
||||
- help wanted
|
||||
- feature request
|
||||
- Help Wanted
|
||||
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: true
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: '3.7'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
@@ -10,11 +10,11 @@ jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-latest
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
python-version: [3.6, 3.7, 3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
image: python
|
||||
|
||||
stages:
|
||||
- test
|
||||
|
||||
before_script:
|
||||
- curl -O https://bootstrap.pypa.io/get-pip.py
|
||||
- python get-pip.py
|
||||
- pip install tox
|
||||
|
||||
python35:
|
||||
image: python:3.5
|
||||
stage: test
|
||||
script: tox -e py35
|
||||
|
||||
python36:
|
||||
image: python:3.6
|
||||
stage: test
|
||||
script: tox -e py36
|
||||
|
||||
lint:
|
||||
image: python:3.6
|
||||
stage: test
|
||||
script: tox -e lint
|
||||
|
||||
+1
-8
@@ -58,11 +58,7 @@ class Auth:
|
||||
"""Return authorization header."""
|
||||
if self.token is None:
|
||||
return None
|
||||
return {
|
||||
"TOKEN_AUTH": self.token,
|
||||
"user-agent": DEFAULT_USER_AGENT,
|
||||
"content-type": "application/json",
|
||||
}
|
||||
return {"TOKEN_AUTH": self.token, "user-agent": DEFAULT_USER_AGENT}
|
||||
|
||||
def create_session(self, opts=None):
|
||||
"""Create a session for blink communication."""
|
||||
@@ -231,9 +227,6 @@ class Auth:
|
||||
try:
|
||||
json_resp = response.json()
|
||||
blink.available = json_resp["valid"]
|
||||
if not json_resp["valid"]:
|
||||
_LOGGER.error(f"{json_resp['message']}")
|
||||
return False
|
||||
except (KeyError, TypeError):
|
||||
_LOGGER.error("Did not receive valid response from server.")
|
||||
return False
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
|
||||
MAJOR_VERSION = 0
|
||||
MINOR_VERSION = 16
|
||||
PATCH_VERSION = "5.rc0"
|
||||
PATCH_VERSION = 4
|
||||
|
||||
__version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}"
|
||||
|
||||
@@ -34,7 +34,6 @@ PROJECT_CLASSIFIERS = [
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Topic :: Home Automation",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
black==19.10b0
|
||||
coverage==5.4
|
||||
coverage==5.3
|
||||
flake8==3.8.4
|
||||
flake8-docstrings==1.5.0
|
||||
pre-commit==2.9.3
|
||||
pre-commit==2.7.1
|
||||
pylint==2.6.0
|
||||
pydocstyle==5.1.1
|
||||
pytest==6.2.2
|
||||
pytest-cov==2.11.1
|
||||
pytest==6.1.1
|
||||
pytest-cov==2.10.1
|
||||
pytest-sugar==0.9.4
|
||||
pytest-timeout==1.4.2
|
||||
restructuredtext-lint==1.3.2
|
||||
pygments==2.7.4
|
||||
restructuredtext-lint==1.3.1
|
||||
pygments==2.7.1
|
||||
testtools>=2.4.0
|
||||
|
||||
+1
-5
@@ -128,11 +128,7 @@ class TestAuth(unittest.TestCase):
|
||||
def test_header(self):
|
||||
"""Test header data."""
|
||||
self.auth.token = "bar"
|
||||
expected_header = {
|
||||
"TOKEN_AUTH": "bar",
|
||||
"user-agent": const.DEFAULT_USER_AGENT,
|
||||
"content-type": "application/json",
|
||||
}
|
||||
expected_header = {"TOKEN_AUTH": "bar", "user-agent": const.DEFAULT_USER_AGENT}
|
||||
self.assertDictEqual(self.auth.header, expected_header)
|
||||
|
||||
def test_header_no_token(self):
|
||||
|
||||
Reference in New Issue
Block a user