tests package

Submodules

tests.helpers module

class tests.helpers.MqttClient[source]

Bases: object

last_messages = {}
on_connect(client, userdata, flags, rc)[source]
on_message(client, userdata, msg)[source]
tests.helpers.assert_all_close(a, b, tolerance)[source]
tests.helpers.assert_dict_equal(a, b)[source]
tests.helpers.create_plate(hs, plate_id, tag, parent_plate=None)[source]
tests.helpers.delete_meta_data(hs, tag, values, parent='root')[source]
tests.helpers.delete_plate(hs, plate_id)[source]
tests.helpers.get_meta_data(hs, tag)[source]
tests.helpers.insert_meta_data(hs, tag, values, parent='root')[source]
tests.helpers.is_close(a, b, tolerance)[source]
tests.helpers.mosquitto_is_running()[source]
tests.helpers.resource_manager(*args, **kwds)[source]
tests.helpers.setup()[source]
tests.helpers.teardown()[source]

tests.test_time_interval module

class tests.test_time_interval.HyperStreamTimeIntervalTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_constructors()[source]
test_relative_time_interval()[source]
test_split()[source]
test_time_interval()[source]

tests.test_tool_channel module

Module contents

Running the tests:

Run the following command

>>> nosetests

Note that for the MQTT logging test to succeed, you will need to have an MQTT broker running (e.g. Mosquitto). For example:

` docker run -ti -p 1883:1883 -p 9001:9001 toke/mosquitto `

or on OSX you will need pidof and mosquitto:

` brew install pidof brew install mosquitto brew services start mosquitto `