Exemplo n.º 1
0
 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'))
Exemplo n.º 2
0
 def test_sanitises_forbidden_characters(self):
     self.assertEqual('auto-foobar',
                      make_bugtracker_name('mailto:[email protected]'))
Exemplo n.º 3
0
 def test_email_address(self):
     self.assertEqual('auto-foo.bar',
                      make_bugtracker_name('mailto:[email protected]'))
Exemplo n.º 4
0
 def test_url(self):
     self.assertEqual(
         'auto-bugs.example.com',
         make_bugtracker_name('http://bugs.example.com/shrubbery'))
Exemplo n.º 5
0
 def test_sanitises_forbidden_characters(self):
     self.assertEquals(
         'auto-foobar',
         make_bugtracker_name('mailto:[email protected]'))
Exemplo n.º 6
0
 def test_email_address(self):
     self.assertEquals(
         'auto-foo.bar',
         make_bugtracker_name('mailto:[email protected]'))
Exemplo n.º 7
0
 def test_url(self):
     self.assertEquals(
         'auto-bugs.example.com',
         make_bugtracker_name('http://bugs.example.com/shrubbery'))