Test cases¶
-
class
gaiatest.gaia_test.
GaiaTestCase
(*args, **kwargs)[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'))
-