Skip to content

Commit

Permalink
Test blinds commands, add then to CLI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Bloemberg committed May 13, 2017
1 parent be532d1 commit d2aae15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rflink/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Usage:
rflink [-v | -vv] [options]
rflink [-v | -vv] [options] [--repeat <repeat>] (on | off | allon | alloff) <id>
rflink [-v | -vv] [options] [--repeat <repeat>] (on|off|allon|alloff|up|down|stop) <id>
rflink (-h | --help)
rflink --version
Expand Down Expand Up @@ -43,7 +43,7 @@
'repeat': RepeaterProtocol,
}

ALL_COMMANDS = ['on', 'off', 'allon', 'alloff']
ALL_COMMANDS = ['on', 'off', 'allon', 'alloff', 'up', 'down', 'stop']


def main(argv=sys.argv[1:], loop=None):
Expand Down
4 changes: 4 additions & 0 deletions tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
'hardware': 'Nodo RadioFrequencyLink',
'firmware': 'RFLink Gateway',
}],
['20;05;RTS;ID=147907;SWITCH=01;CMD=UP;', {
'id': '147907', 'switch': '01', 'protocol': 'rts',
'command': 'up',
}]
])
def test_packet_parsing(packet, expect):
"""Packet should be broken up into their primitives."""
Expand Down

0 comments on commit d2aae15

Please sign in to comment.