Adafruit_IO_Python/tests
2018-07-10 16:32:18 -04:00
..
base.py adding in dummy account and unit testing for travis 2018-07-10 16:32:18 -04:00
README.txt Update to use new MQTT path with username. 2015-06-03 13:30:36 -07:00
test_client.py added extra data tests, fixed mqtt unit test 2018-07-10 16:19:21 -04:00
test_errors.py add username to client call 2017-06-26 16:26:43 -05:00
test_model.py testing/models explicit feed checks and group properties check 2018-07-09 17:44:44 -04:00
test_mqtt_client.py added extra data tests, fixed mqtt unit test 2018-07-10 16:19:21 -04: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.