def test_string_has_pattern_returns_as_expected(self): pattern = "abc" string1 = "abc" string2 = "123" ok_(util.string_has_pattern(string1, pattern)) assert_false(util.string_has_pattern(string2, pattern))
def get_tags_by_pattern(self, pattern, repo_path): tags = self.tag(repo_path) return [t for t in tags if util.string_has_pattern(t, pattern)]