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