class TestTsBase(object): ts_base_registered_keys = { "url", "url_timestamp", "timeout", "cycles", "profile_path", "gecko_profile", "gecko_profile_interval", "gecko_profile_entries", "gecko_profile_startup", "preferences", "xperf_counters", "xperf_providers", "xperf_user_providers", "xperf_stackwalk", "tpmozafterpaint", "fnbpaint", "tphero", "profile", "firstpaint", "userready", "testeventmap", "base_vs_ref", "extensions", "filters", "setup", "cleanup", "webextensions", "reinstall", } def setup_method(self): self.test_instance = TsBase() def test_no_unknown_keys_are_somehow_added_alongside_registered_ones(self): assert set(self.test_instance.keys) == self.ts_base_registered_keys self.test_instance.update(attribute_one="value", attribute_two="value") assert set(self.test_instance.keys) == self.ts_base_registered_keys def test_nonnull_keys_show_up(self): assert dict(self.test_instance.items()) == { "name": "TsBase", "filters": self.test_instance.filters, } self.test_instance.update(timeout=500) assert dict(self.test_instance.items()) == { "name": "TsBase", "filters": self.test_instance.filters, "timeout": 500, }
class TestTsBase(object): ts_base_registered_keys = { 'url', 'url_timestamp', 'timeout', 'cycles', 'profile_path', 'gecko_profile', 'gecko_profile_interval', 'gecko_profile_entries', 'gecko_profile_startup', 'preferences', 'xperf_counters', 'xperf_providers', 'xperf_user_providers', 'xperf_stackwalk', 'tpmozafterpaint', 'fnbpaint', 'tphero', 'profile', 'firstpaint', 'userready', 'testeventmap', 'base_vs_ref', 'extensions', 'filters', 'setup', 'cleanup', 'webextensions', 'reinstall', } def setup_method(self): self.test_instance = TsBase() def test_no_unknown_keys_are_somehow_added_alongside_registered_ones(self): assert set(self.test_instance.keys) == self.ts_base_registered_keys self.test_instance.update(attribute_one='value', attribute_two='value') assert set(self.test_instance.keys) == self.ts_base_registered_keys def test_nonnull_keys_show_up(self): assert dict(self.test_instance.items()) == { 'name': 'TsBase', 'filters': self.test_instance.filters } self.test_instance.update(timeout=500) assert dict(self.test_instance.items()) == { 'name': 'TsBase', 'filters': self.test_instance.filters, 'timeout': 500 }
class TestTsBase(object): ts_base_registered_keys = { 'url', 'url_timestamp', 'timeout', 'cycles', 'profile_path', 'gecko_profile', 'gecko_profile_interval', 'gecko_profile_entries', 'gecko_profile_startup', 'preferences', 'xperf_counters', 'xperf_providers', 'xperf_user_providers', 'xperf_stackwalk', 'tpmozafterpaint', 'fnbpaint', 'profile', 'firstpaint', 'userready', 'testeventmap', 'base_vs_ref', 'extensions', 'filters', 'setup', 'cleanup', 'webextensions', 'reinstall', } def setup_method(self): self.test_instance = TsBase() def test_no_unknown_keys_are_somehow_added_alongside_registered_ones(self): assert set(self.test_instance.keys) == self.ts_base_registered_keys self.test_instance.update(attribute_one='value', attribute_two='value') assert set(self.test_instance.keys) == self.ts_base_registered_keys def test_nonnull_keys_show_up(self): assert dict(self.test_instance.items()) == { 'name': 'TsBase', 'filters': self.test_instance.filters } self.test_instance.update(timeout=500) assert dict(self.test_instance.items()) == { 'name': 'TsBase', 'filters': self.test_instance.filters, 'timeout': 500 }