def test_thioesterase(self, mocked_get, mocked_match): mocked_match.return_value = True for char in string.ascii_uppercase: mocked_get.return_value = [DummyAlignment(char, {81: char})] pairings = analysis.asp_thioesterase(self.record) assert pairings == [(char, "active site serine present: %s" % (char == "S"))] # and an inconclusive mocked_match.return_value = False # values here don't matter mocked_get.return_value = [DummyAlignment("incon", {})] pairings = analysis.asp_thioesterase(self.record) assert pairings == [("incon", "active site serine inconclusive")]
def test_thioesterase(self): with umock.patch.object(active_site_finder.common.ActiveSiteAnalysis, "scaffold_matches") as mocked_match: mocked_match.return_value = True for char in string.ascii_uppercase: mock("active_site_finder.common.ActiveSiteAnalysis.get_alignments", returns=[DummyAlignment(char, {81: char})]) pairings = analysis.asp_thioesterase(self.record) assert pairings == [(char, "active site serine present: %s" % (char == "S"))] # and an inconclusive mocked_match.return_value = False # values here don't matter mock("active_site_finder.common.ActiveSiteAnalysis.get_alignments", returns=[DummyAlignment("incon", {})]) pairings = analysis.asp_thioesterase(self.record) assert pairings == [("incon", "active site serine inconclusive")]
def test_thioesterase(self): with patch.object(subprocessing, "run_hmmpfam2", return_value=parse_hmmpfam_results("TE.output")): results = analysis.asp_thioesterase(self.record) expected = {'Thioesterase0': 'active site serine present: True'} assert {dom.domain_id: message for dom, message in results} == expected
def test_thioesterase(self): mock("subprocessing.run_hmmpfam2", returns=parse_hmmpfam_results("TE.output")) results = analysis.asp_thioesterase(self.record) expected = {'Thioesterase0': 'active site serine present: True'} assert {dom.domain_id: message for dom, message in results} == expected