def test_include_stage_for_failing_builds(self): params = self.factory(status='failed') body = message_builder(**params) self.assertIn('Stage:', body['text'])
def test_include_stage_for_broken_builds(self): params = self.factory(status='is broken') body = message_builder(**params) self.assertIn('Stage:', body['text'])
def test_exclude_changeset_for_deploy_stages(self): for stage in TEST_DEPLOY_STAGES: params = self.factory(stage=stage, status='passed') body = message_builder(**params) self.assertNotIn('Changeset:', body['text'])
def test_include_changeset_for_ci_stages(self): for stage in TEST_CI_STAGES: params = self.factory(stage=stage, status='passed') body = message_builder(**params) self.assertIn('Changeset:', body['text'])
def test_x_icon_for_broken_build(self): params = self.factory(stage='package', status='is broken') body = message_builder(**params) self.assertEqual(':x:', body['icon_emoji'])
def test_tick_icon_for_fixed_build(self): params = self.factory(stage='package', status='is fixed') body = message_builder(**params) self.assertEqual(':white_check_mark:', body['icon_emoji'])
def test_exclude_stage_for_passing_builds(self): params = self.factory(status='passed') body = message_builder(**params) self.assertNotIn('Stage:', body['text'])