Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use network_status instead of homescreen #119

Merged
merged 7 commits into from
Nov 19, 2018
Merged

Conversation

md-reddevil
Copy link
Contributor

Use network_status to check if System is armed or disarmed

Description:

Related issue (if applicable): fixes #
fixes #118

Checklist:

  • Local tests with tox run successfully PR cannot be meged unless tests pass
  • Changes tested locally to ensure platform still works as intended
  • Tests added to verify new code works

Use network_status to check if System is armed or disarmed
@@ -114,6 +117,7 @@ def refresh(self, force_cache=False):
self.events = self.get_events()
self.videos = self.get_videos()
self.homescreen = api.request_homescreen(self.blink)
self.network_info = api.request_network_status(self.blink,self.network_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)
missing whitespace after ','

@@ -88,6 +89,8 @@ def start(self):

self.homescreen = api.request_homescreen(self.blink)

self.network_info = api.request_network_status(self.blink,self.network_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)
missing whitespace after ','

@@ -114,6 +118,8 @@ def refresh(self, force_cache=False):
self.events = self.get_events()
self.videos = self.get_videos()
self.homescreen = api.request_homescreen(self.blink)
self.network_info = api.request_network_status(self.blink,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

@@ -88,6 +89,9 @@ def start(self):

self.homescreen = api.request_homescreen(self.blink)

self.network_info = api.request_network_status(self.blink,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

@@ -114,6 +117,7 @@ def refresh(self, force_cache=False):
self.events = self.get_events()
self.videos = self.get_videos()
self.homescreen = api.request_homescreen(self.blink)
self.network_info = api.request_network_status(self.blink, self.network_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix this:

Suggested change
self.network_info = api.request_network_status(self.blink, self.network_id)
self.network_info = api.request_network_status(self.blink,
self.network_id)

@fronzbot fronzbot self-assigned this Nov 17, 2018
@fronzbot
Copy link
Owner

The test_blink_sync test is failing because you added a new api call in the sync.start method, so you need to add an extra entry to the mock_resp.side_effect list in test_sync_module.py. My suggestion is to just append another None to the list and that should make that test pass. After that just fix the linting errors (I think hound called them all out) and it's good to merge 👍

@fronzbot fronzbot added this to the 0.11.0 milestone Nov 17, 2018
@fronzbot
Copy link
Owner

The test fix I gave you was incorrect, I misread the code. I just went in and fixed it myself and cleaned up the linting error, so it's ready to merge now. Thanks for the continued contributions!

@fronzbot fronzbot merged commit 1aa5dc1 into fronzbot:dev Nov 19, 2018
This was referenced Nov 19, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants