def test_get_ans_results(self): result_obj = "RESULT_STRING" results = { "dark": { self.BUILDER_HOSTNAME: result_obj }, "contacted": {} } assert result_obj == builder_module.get_ans_results( results, self.BUILDER_HOSTNAME) results = { "contacted": { self.BUILDER_HOSTNAME: result_obj }, "dark": {} } assert result_obj == builder_module.get_ans_results( results, self.BUILDER_HOSTNAME) results = { "contacted": { self.BUILDER_HOSTNAME: "wrong_obj" }, "dark": { self.BUILDER_HOSTNAME: result_obj } } assert result_obj == builder_module.get_ans_results( results, self.BUILDER_HOSTNAME) results = {"contacted": {}, "dark": {}} assert {} == builder_module.get_ans_results(results, self.BUILDER_HOSTNAME)
def test_get_ans_results(self): result_obj = "RESULT_STRING" results = {"dark": {self.BUILDER_HOSTNAME: result_obj}, "contacted": {}} assert result_obj == builder_module.get_ans_results(results, self.BUILDER_HOSTNAME) results = {"contacted": {self.BUILDER_HOSTNAME: result_obj}, "dark": {}} assert result_obj == builder_module.get_ans_results(results, self.BUILDER_HOSTNAME) results = {"contacted": {self.BUILDER_HOSTNAME: "wrong_obj"}, "dark": {self.BUILDER_HOSTNAME: result_obj}} assert result_obj == builder_module.get_ans_results(results, self.BUILDER_HOSTNAME) results = {"contacted": {}, "dark": {}} assert {} == builder_module.get_ans_results(results, self.BUILDER_HOSTNAME)