def test_with_build_job(self, fetch_allthethings_data): """For build jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = ALLTHETHINGS assert get_associated_platform_name( 'OS X 10.7 try build') == 'macosx64'
def test_with_test_job(self, fetch_allthethings_data): """For non-talos test jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = get_associated_platform_name( 'Windows 8 64-bit try opt test mochitest-1') assert obtained == 'win64'
def test_talos(self, fetch_allthethings_data): """For talos jobs it should return the stage-platform attribute.""" fetch_allthethings_data.return_value = ALLTHETHINGS assert get_associated_platform_name( 'Ubuntu HW 12.04 x64 try talos tp5o-e10s') == 'linux64'
def test_talos(self, fetch_allthethings_data): """For talos jobs it should return the stage-platform attribute.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( get_associated_platform_name('Platform1 repo talos tp5o'), 'stage-platform1')
def test_with_build_job(self, fetch_allthethings_data): """For build jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( get_associated_platform_name('Platform1 repo build'), 'platform1')
def test_with_build_job(self, fetch_allthethings_data): """For build jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = ALLTHETHINGS assert get_associated_platform_name('OS X 10.7 try build') == 'macosx64'
def test_with_test_job(self, fetch_allthethings_data): """For non-talos test jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( get_associated_platform_name('Platform1 repo opt test mochitest-1'), 'platform1')
def test_talos(self, fetch_allthethings_data): """For talos jobs it should return the stage-platform attribute.""" fetch_allthethings_data.return_value = ALLTHETHINGS assert get_associated_platform_name('Ubuntu HW 12.04 x64 try talos tp5o') == 'linux64'
def test_with_test_job(self, fetch_allthethings_data): """For non-talos test jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = get_associated_platform_name('Windows 10 64-bit try opt test mochitest-1') assert obtained == 'win64'
def test_with_build_job(self, fetch_allthethings_data): """For build jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals(get_associated_platform_name('Platform1 repo build'), 'platform1')
def test_with_test_job(self, fetch_allthethings_data): """For non-talos test jobs it should return the platform attribute.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( get_associated_platform_name( 'Platform1 repo opt test mochitest-1'), 'platform1')