def test_github(self): self.assertEqual( 'auto-github-user-repository', make_bugtracker_name('https://github.com/user/repository/issues')) self.assertEqual( 'auto-github-user-repository', make_bugtracker_name('https://github.com/user/Repository/issues')) # Invalid on the GitHub side, but let's make sure these don't blow up. self.assertEqual( 'auto-github-user', make_bugtracker_name('https://github.com/user/issues')) self.assertEqual( 'auto-github-user-foo-bar', make_bugtracker_name('https://github.com/user/foo/bar/issues'))
def test_sanitises_forbidden_characters(self): self.assertEqual('auto-foobar', make_bugtracker_name('mailto:[email protected]'))
def test_email_address(self): self.assertEqual('auto-foo.bar', make_bugtracker_name('mailto:[email protected]'))
def test_url(self): self.assertEqual( 'auto-bugs.example.com', make_bugtracker_name('http://bugs.example.com/shrubbery'))
def test_sanitises_forbidden_characters(self): self.assertEquals( 'auto-foobar', make_bugtracker_name('mailto:[email protected]'))
def test_email_address(self): self.assertEquals( 'auto-foo.bar', make_bugtracker_name('mailto:[email protected]'))
def test_url(self): self.assertEquals( 'auto-bugs.example.com', make_bugtracker_name('http://bugs.example.com/shrubbery'))