зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1429687 - Fix existing tests r=rwood
MozReview-Commit-ID: G3ukD0Xn0lk --HG-- extra : rebase_source : 19d3696f74c04a3d51e082642569619f260a0725
This commit is contained in:
Родитель
49224c479c
Коммит
b5df0ac07a
|
@ -117,7 +117,7 @@ class Test_get_test(object):
|
|||
|
||||
|
||||
class Test_get_browser_config(object):
|
||||
required = ('preferences', 'extensions', 'browser_path', 'browser_wait',
|
||||
required = ('extensions', 'browser_path', 'browser_wait',
|
||||
'extra_args', 'buildid', 'env', 'init_url', 'webserver')
|
||||
optional = ['bcontroller_config',
|
||||
'branch_name',
|
||||
|
@ -155,7 +155,7 @@ class Test_get_browser_config(object):
|
|||
def test_raises_keyerror_for_required_keys(self):
|
||||
config_missing_required = dict.fromkeys(self.required, '')
|
||||
config_missing_required.update(title='is_mandatory')
|
||||
del config_missing_required['preferences']
|
||||
del config_missing_required['extensions']
|
||||
|
||||
with pytest.raises(KeyError):
|
||||
get_browser_config(config_missing_required)
|
||||
|
@ -169,16 +169,6 @@ class Test_get_browser_config(object):
|
|||
except KeyError:
|
||||
pytest.fail('Must not raise exception on missing optional')
|
||||
|
||||
def test_browser_keys_are_subset_from_config(self):
|
||||
config_extensive = dict.fromkeys(self.required, '')
|
||||
config_extensive.update(dict.fromkeys(self.optional, ''))
|
||||
config_extensive['title'] = 'is_mandatory'
|
||||
config_extensive['extra_custom_key'] = 'value'
|
||||
|
||||
browser_config = get_browser_config(config_extensive)
|
||||
assert browser_config != config_extensive
|
||||
assert set(browser_config).issubset(set(config_extensive))
|
||||
|
||||
|
||||
class Test_get_config(object):
|
||||
@classmethod
|
||||
|
@ -433,6 +423,7 @@ class Test_get_config(object):
|
|||
assert test_config['tploadnocache'] is True
|
||||
assert test_config['unit'] == 'ms'
|
||||
assert test_config['preferences'] == {
|
||||
'addon.test.cpstartup.webserver': '${webserver}',
|
||||
'browser.link.open_newwindow': 3,
|
||||
'browser.link.open_newwindow.restriction': 2,
|
||||
}
|
||||
|
@ -658,7 +649,7 @@ class Test_get_config(object):
|
|||
assert test_config['filters'] is not None
|
||||
assert test_config['timeout'] == 1800
|
||||
assert test_config['unit'] == 'ms'
|
||||
assert test_config['webextensions'] == '${talos}/webextensions/dummy/dummy-signed.xpi'
|
||||
assert test_config['webextensions'] == '${talos}/webextensions/dummy/dummy.xpi'
|
||||
assert test_config['preferences'] == {'xpinstall.signatures.required': False}
|
||||
|
||||
@mock.patch('talos.config.build_manifest', conftest.patched_build_manifest)
|
||||
|
@ -937,7 +928,7 @@ class Test_get_config(object):
|
|||
assert test_config['filters'] is not None
|
||||
assert test_config['unit'] == 'ms'
|
||||
assert test_config['lower_is_better'] is True
|
||||
assert test_config['fnbpaint'] is True
|
||||
assert test_config['fnbpaint'] is False
|
||||
assert test_config['tpmanifest'] != \
|
||||
'${talos}/tests/quantum_pageload/quantum_pageload_google.manifest'
|
||||
|
||||
|
@ -953,7 +944,7 @@ class Test_get_config(object):
|
|||
assert test_config['filters'] is not None
|
||||
assert test_config['unit'] == 'ms'
|
||||
assert test_config['lower_is_better'] is True
|
||||
assert test_config['fnbpaint'] is True
|
||||
assert test_config['fnbpaint'] is False
|
||||
assert test_config['profile'] == 'simple'
|
||||
|
||||
def test_tp6_youtube_has_expected_attributes(self):
|
||||
|
|
|
@ -146,6 +146,7 @@ class TestTsBase(object):
|
|||
'xperf_stackwalk',
|
||||
'tpmozafterpaint',
|
||||
'fnbpaint',
|
||||
'tphero',
|
||||
'profile',
|
||||
'firstpaint',
|
||||
'userready',
|
||||
|
|
Загрузка…
Ссылка в новой задаче