def test_opt(self, fetch_allthethings_data): """For opt builds it should return True .""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( _wanted_builder('Platform1 mozilla-central opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-aurora opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-inbound opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-beta opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-release opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-esr38 opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-esr45 opt test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 repo opt test mochitest-1'), True) with pytest.raises(MozciError): _wanted_builder('Platform1 non-existent-repo2 opt test mochitest-1')
def test_pgo(self, fetch_allthethings_data): """For pgo builds it should return False as an equivalent opt build exists.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( _wanted_builder('Platform1 mozilla-central pgo test mochitest-1'), False) self.assertEquals( _wanted_builder('Platform1 mozilla-aurora pgo test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-inbound pgo test mochitest-1'), False) self.assertEquals( _wanted_builder('Platform1 mozilla-beta pgo test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-release pgo test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-esr38 pgo test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 mozilla-esr45 pgo test mochitest-1'), True) self.assertEquals( _wanted_builder('Platform1 repo pgo test mochitest-1'), False) with pytest.raises(MozciError): _wanted_builder('Platform1 non-existent-repo1 pgo test mochitest-1')
def test_tests(self, fetch_allthethings_data): """For pgo builds it should return False as an equivalent opt build exists.""" fetch_allthethings_data.return_value = ALLTHETHINGS assert _wanted_builder( 'Windows 7 32-bit mozilla-central debug test mochitest-chrome-1' ) is True assert _wanted_builder( 'Windows 7 32-bit mozilla-central opt test mochitest-chrome-1' ) is True assert _wanted_builder( 'Windows 7 32-bit mozilla-central pgo test mochitest-chrome-1' ) is True assert _wanted_builder( 'Windows 7 32-bit mozilla-beta debug test mochitest-chrome-1' ) is True assert _wanted_builder( 'Windows 7 32-bit mozilla-beta opt test mochitest-chrome-1' ) is True assert _wanted_builder( 'Windows 7 32-bit mozilla-beta pgo test mochitest-chrome-1' ) is True with pytest.raises(MissingBuilderError): _wanted_builder( 'Windows 7 VM 32-bit non-existent-repo1 pgo test mochitest-1')
def test_tests(self, fetch_allthethings_data): """For pgo builds it should return False as an equivalent opt build exists.""" fetch_allthethings_data.return_value = ALLTHETHINGS assert _wanted_builder('Windows 7 VM 32-bit mozilla-central debug test mochitest-1') is True assert _wanted_builder('Windows 7 VM 32-bit mozilla-central opt test mochitest-1') is True assert _wanted_builder('Windows 7 VM 32-bit mozilla-central pgo test mochitest-1') is True assert _wanted_builder('Windows 7 VM 32-bit mozilla-aurora debug test mochitest-1') is True assert _wanted_builder('Windows 7 VM 32-bit mozilla-aurora opt test mochitest-1') is True assert _wanted_builder('Windows 7 VM 32-bit mozilla-aurora pgo test mochitest-1') is True with pytest.raises(MissingBuilderError): _wanted_builder('Windows 7 VM 32-bit non-existent-repo1 pgo test mochitest-1')
def test_talos(self, fetch_allthethings_data): """For opt builds it should return True .""" fetch_allthethings_data.return_value = ALLTHETHINGS assert _wanted_builder('Windows 7 32-bit mozilla-central pgo talos tp5o') is True assert _wanted_builder('Windows 7 32-bit mozilla-central talos tp5o') is True assert _wanted_builder('Windows 7 32-bit mozilla-aurora pgo talos tp5o') is True assert _wanted_builder('Windows 7 32-bit mozilla-aurora talos tp5o') is False assert _wanted_builder('Windows 7 32-bit try talos tp5o') is True with pytest.raises(MissingBuilderError): _wanted_builder('Windows 7 32-bit try pgo talos tp5o') is True
def test_talos(self, fetch_allthethings_data): """For opt builds it should return True .""" fetch_allthethings_data.return_value = ALLTHETHINGS assert _wanted_builder( 'Windows XP 32-bit mozilla-central pgo talos tp5o') is True assert _wanted_builder( 'Windows XP 32-bit mozilla-central talos tp5o') is True assert _wanted_builder( 'Windows XP 32-bit mozilla-aurora pgo talos tp5o') is True assert _wanted_builder( 'Windows XP 32-bit mozilla-aurora talos tp5o') is False assert _wanted_builder('Windows XP 32-bit try talos tp5o') is True with pytest.raises(MissingBuilderError): _wanted_builder('Windows XP 32-bit try pgo talos tp5o') is True