def test_returns_empty_string_if_miuns_one(self): self.assertEquals("", line_anchor(-1))
def test_returns_anchor_string_for_numbers_given_as_strings(self): self.assertEquals("#22", line_anchor("22"))
def test_returns_empty_string_if_not_number(self): self.assertEquals("", line_anchor("hello"))
def test_returns_anchor_string_for_numbers(self): self.assertEquals("#33", line_anchor(33))
def POST(self, review_id): i = web.webapi.input() config.repo.add_comment(review_id, i.author, i.comment, i.line_number) web.seeother("/review/%s%s" % (review_id, line_anchor(i.line_number)))