Test cases

class gaiatest.gaia_test.GaiaTestCase(*args, **kwargs)[source]
cleanup_data()[source]
cleanup_gaia(full_reset=True)[source]
cleanup_storage()[source]

Remove all files from the device’s storage paths

connect_to_local_area_network()[source]
disable_all_network_connections()[source]
modify_prefs(prefs)[source]

Hook to modify the default preferences before they’re applied.

Parameters:prefs – dictionary of the preferences that would be applied.
Returns:modified dictionary of the preferences to be applied.

This method provides the ability for test cases to override the default preferences before they’re applied. To use it, define the method in your test class and return a modified dictionary of preferences:

class TestModifyPrefs(GaiaTestCase):

    def modify_prefs(self, prefs):
        prefs['foo'] = 'bar'
        return prefs

    def test_modify_prefs(self):
        self.assertEqual('bar', self.data_layer.get_char_pref('foo'))
modify_settings(settings)[source]

Hook to modify the default settings before they’re applied.

Parameters:settings – dictionary of the settings that would be applied.
Returns:modified dictionary of the settings to be applied.

This method provides the ability for test cases to override the default settings before they’re applied. To use it, define the method in your test class and return a modified dictionary of settings:

class TestModifySettings(GaiaTestCase):

    def modify_settings(self, settings):
        settings['foo'] = 'bar'
        return settings

    def test_modify_settings(self):
        self.assertEqual('bar', self.data_layer.get_setting('foo'))
pull_video_capture()[source]
push_resource(filename, remote_path=None, count=1)[source]
resource(filename)[source]
setUp()[source]
set_default_settings()[source]
start_video_capture()[source]
stop_video_capture()[source]
tearDown()[source]
wait_for_condition(method, timeout=None, message=None)[source]