amazon_dash.tests package

Submodules

amazon_dash.tests.base module

class amazon_dash.tests.base.ConfigFileMockBase[source]

Bases: FileMockBase

setUp()[source]
tearDown()[source]
class amazon_dash.tests.base.ExecuteMockBase[source]

Bases: object

setUp()[source]
tearDown()[source]
class amazon_dash.tests.base.FileMockBase[source]

Bases: object

contents = ''
setUp()[source]
tearDown()[source]

amazon_dash.tests.test_config module

class amazon_dash.tests.test_config.TestCheckConfig(methodName='runTest')[source]

Bases: TestCase

test_fail()[source]
test_success()[source]
class amazon_dash.tests.test_config.TestConfig(methodName='runTest')[source]

Bases: TestCase

test_invalid_config(getuid_mock)[source]
test_not_found(mock_method)[source]
test_other_user(getuid_mock)[source]
test_other_user_error(getuid_mock, file_owner_mock, file_group_mock)[source]
test_root(getuid_mock)[source]
test_root_error(getuid_mock, file_owner_mock, file_group_mock)[source]
test_yaml_exception()[source]
class amazon_dash.tests.test_config.TestOnlyRootWrite(methodName='runTest')[source]

Bases: FileMockBase, TestCase

test_no_perms()[source]
test_other_perms()[source]
test_root_owner()[source]
test_user_owner()[source]
class amazon_dash.tests.test_config.TestOthWPerm(methodName='runTest')[source]

Bases: FileMockBase, TestCase

test_no_perms()[source]
test_perms()[source]

amazon_dash.tests.test_discovery module

class amazon_dash.tests.test_discovery.TestDiscovery(methodName='runTest')[source]

Bases: TestCase

test_amazon_device()[source]
test_banned_devices()[source]
test_device()[source]
test_discovery_print(write_patch)[source]

amazon_dash.tests.test_execute module

class amazon_dash.tests.test_execute.TestExecuteCmd(methodName='runTest')[source]

Bases: ExecuteMockBase, TestCase

test_execute()[source]
test_execute_root()[source]
test_execute_root_error()[source]
test_get_shell()[source]
test_ssh()[source]
test_user_on_ssh()[source]
class amazon_dash.tests.test_execute.TestExecuteCmdFunction(methodName='runTest')[source]

Bases: TestCase

test_error(m)[source]
test_success(m)[source]
test_timeout(m)[source]
class amazon_dash.tests.test_execute.TestExecuteHomeAssistant(methodName='runTest')[source]

Bases: TestCase

default_data(address='localhost', event='test', extra_data=None)[source]
path = '/api/events/test'
test_execute()[source]
test_execute_with_access()[source]
test_execute_with_access_token()[source]
test_full_address()[source]
test_include_address_port()[source]
test_include_address_protocol()[source]
test_no_event()[source]
test_only_address()[source]
url = 'http://localhost:8123/api/events/test'
class amazon_dash.tests.test_execute.TestExecuteIFTTT(methodName='runTest')[source]

Bases: TestCase

default_data()[source]
test_event_required()[source]
test_execute()[source]
test_key_required()[source]
class amazon_dash.tests.test_execute.TestExecuteOpenHab(methodName='runTest')[source]

Bases: TestCase

default_data(address='localhost', item='test')[source]
path = '/rest/items/test'
test_execute()[source]
url = 'http://localhost:8080/rest/items/test'
class amazon_dash.tests.test_execute.TestExecuteOverSsh(methodName='runTest')[source]

Bases: TestCase

test_execute_double_quotes()[source]
test_execute_single_quotes()[source]
test_execute_with_port()[source]
test_execute_without_port()[source]
test_invalid_port()[source]
class amazon_dash.tests.test_execute.TestExecuteUrl(methodName='runTest')[source]

Bases: TestCase

get_default_data()[source]
no_body_methods = ['get', 'head', 'delete', 'connect', 'options', 'trace']
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_authorization()[source]
test_body_invalid_method()[source]
test_content_type_invalid_method()[source]
test_execute()[source]
test_execute_400()[source]
test_execute_body()[source]
test_execute_content_type()[source]
test_execute_exception()[source]
test_execute_headers()[source]
test_form_data()[source]
test_form_invalid_data()[source]
test_verify()[source]
url = 'http://domain.com'
amazon_dash.tests.test_execute.io_out(text)[source]

amazon_dash.tests.test_listener module

class amazon_dash.tests.test_listener.TestDevice(methodName='runTest')[source]

Bases: ExecuteMockBase, TestCase

test_create()[source]
test_device_src()[source]
test_execute_error()[source]
test_multiple_executes()[source]
test_name()[source]
test_no_execute()[source]
test_send_confirmation()[source]
class amazon_dash.tests.test_listener.TestListener(methodName='runTest')[source]

Bases: ConfigFileMockBase, TestCase

contents = '# amazon-dash.yml\n# ---------------\nsettings:\n  delay: 10\ndevices:\n  0C:47:C9:98:4A:12:\n    name: Hero\n    user: nekmo\n    cmd: spotify\n  44:65:0D:48:FA:88:\n    name: Pompadour\n    user: nekmo\n    cmd: kwrite\n'
test_create()[source]
test_double_called()[source]
test_on_push()[source]
test_thread_start()[source]
class amazon_dash.tests.test_listener.TestTestListener(methodName='runTest')[source]

Bases: ExecuteMockBase, ConfigFileMockBase, TestCase

contents = '# amazon-dash.yml\n# ---------------\nsettings:\n  delay: 10\ndevices:\n  0C:47:C9:98:4A:12:\n    name: Hero\n    user: nekmo\n    cmd: spotify\n  44:65:0D:48:FA:88:\n    name: Pompadour\n    user: nekmo\n    cmd: kwrite\n'
test_invalid_device()[source]
test_success()[source]

Module contents