Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ofalvai committed Dec 5, 2021
1 parent 253e459 commit fd5bb09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions custom_components/candy/client/decryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
class Encryption(Enum):
NO_ENCRYPTION = 1 # Use `encrypted=0` in request, response is plaintext JSON
ENCRYPTION = 2 # Use `encrypted=1` in request, response is encrypted bytes in hex encoding
ENCRYPTION_WITHOUT_KEY = 3 # Use `encrypted=1` in request, response is unencrypted hex bytes
# Details: https://github.com/ofalvai/home-assistant-candy/issues/35#issuecomment-965557116
ENCRYPTION_WITHOUT_KEY = 3 # Use `encrypted=1` in request, response is unencrypted hex bytes (https://github.com/ofalvai/home-assistant-candy/issues/35#issuecomment-965557116)


def find_key(encrypted_response: bytes) -> Optional[str]:
Expand Down
5 changes: 0 additions & 5 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
7B0D0A0922737461747573466F726E6F223A7B0D0A090922537461746F57694669223A2230222C0D0A090922436F646963654572726F7265223A224530222C0D0A0909225265636970654964223A2230222C0D0A09092252656369706553746570223A2230222C0D0A090922537461727453746F70223A2230222C0D0A0909225061757361223A2230222C0D0A0909225369637572657A7A6142616D62696E69223A2230222C0D0A09092253656C6574746F7265223A2230222C0D0A09092250726F6772616D223A2230222C0D0A09092254656D70536574223A2230222C0D0A09092254656D7052656164223A22323130222C0D0A09092254656D705365745261676769756E7461223A2230222C0D0A09092244656C61795374617274223A2230222C0D0A09092252656D61696E696E6754696D6550726F6772223A223635353335222C0D0A0909226F7261223A223135222C0D0A0909226D696E223A223232222C0D0A090922736563223A223138222C0D0A0909224657766572223A2230303141222C0D0A0909227473223A2230220D0A097D0D0A7D
"""

RESPONSE_BAD_REQUEST = aresponses.Response(
text="{\"response\":\"BAD REQUEST\"}",
content_type="text/html"
)


def status_response(filename):
return aresponses.Response(
Expand Down

0 comments on commit fd5bb09

Please sign in to comment.