Adafruit_IO_Python/tests
2017-06-26 16:27:01 -05:00
..
base.py Update to use new MQTT path with username. 2015-06-03 13:30:36 -07:00
README.txt Update to use new MQTT path with username. 2015-06-03 13:30:36 -07:00
test_client.py add username to client calls 2017-06-26 16:27:01 -05:00
test_errors.py add username to client call 2017-06-26 16:26:43 -05:00
test_model.py Major update: 2015-02-01 12:22:03 -08:00
test_mqtt_client.py add retain in on_message test 2017-06-26 15:42:57 -05:00

Adafruit IO Python Client Test README

To run the tests you can use python's built in unittest module's auto discovery.
Do this by running inside this tests directory:
  python -m unittest discover

Some tests require a valid Adafruit IO account to run, and they key for this
account is provided in the ADAFRUIT_IO_KEY environment variable.  Make sure to
set this envirionment variable before running the tests, for example to run all
the tests with a key execute in this directory:
  ADAFRUIT_IO_KEY=my_io_key_value python -m unittest discover

In addition for the MQTT tests you must set the following environment variable
to the username for your AIO account (found on https://accounts.adafruit.com):
  ADAFRUIT_IO_USERNAME=your_username

To add your own tests you are strongly encouraged to build off the test base 
class provided in base.py.  This class provides a place for common functions
that don't need to be duplicated across all the tests.  See the existing test
code for an example of how tests are written and use the base test case.