Beispiel #1
0
    def test_expectations_for_builder(self):
        factory = bot_test_expectations.BotTestExpectationsFactory(
            self.fake_builder_list())
        factory._results_json_for_builder = self.fake_results_json_for_builder

        self.assertIsNotNone(
            factory.expectations_for_builder('Dummy builder name'))
    def test_expectations_for_port(self):
        factory = bot_test_expectations.BotTestExpectationsFactory()
        factory._results_json_for_builder = self.fake_results_json_for_builder

        old_builders = builders._exact_matches
        builders._exact_matches = {
            "Dummy builder name": {"port_name": "dummy-port", "specifiers": []},
        }

        try:
            self.assertIsNotNone(factory.expectations_for_port('dummy-port'))
        finally:
            builders._exact_matches = old_builders
    def test_expectations_for_port(self):
        factory = bot_test_expectations.BotTestExpectationsFactory(
            FakeBuilders())
        factory._results_json_for_builder = self.fake_results_json_for_builder

        self.assertIsNotNone(factory.expectations_for_port('dummy-port'))