def test_deep_link_github_with_lineno(self, ORG_NAMES):
        self._setupmock(ORG_NAMES)
        ORG_NAMES['github'] = 'ghorgname'
        filename = os.path.join(CODE_ROOT, 'github', 'repositoryname', 'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename), lineno=42)

        self.assertEqual('https://github.com/ghorgname/repositoryname/blob/master/somedir/sourcefile.py#L42', dl)
    def test_deep_link_bitbucket_hg_with_lineno(self, ORG_NAMES):
        self._setupmock(ORG_NAMES)
        ORG_NAMES['bitbucket'] = 'bborgname'
        filename = os.path.join(CODE_ROOT, 'bitbucket', 'hg-repo-name', 'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename), lineno=42)

        self.assertEqual('https://bitbucket.org/bborgname/hg-repo-name/src/default/somedir/sourcefile.py#sourcefile.py-42', dl)
    def test_deep_link_bitbucket_git(self, ORG_NAMES):
        self._setupmock(ORG_NAMES)
        ORG_NAMES['bitbucket'] = 'bborgname'
        filename = os.path.join(CODE_ROOT, 'bitbucket', 'git-repo-name', 'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename))

        self.assertEqual('https://bitbucket.org/bborgname/git-repo-name/src/master/somedir/sourcefile.py', dl)
Пример #4
0
    def test_deep_link_bitbucket_hg_with_lineno(self):
        filename = os.path.join(CODE_ROOT, 'bitbucket', 'org-name',
                                'hg-repo-name', 'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename), lineno=42)

        self.assertEqual(
            'https://bitbucket.org/org-name/hg-repo-name/src/default/somedir/sourcefile.py#sourcefile.py-42',
            dl)
Пример #5
0
    def test_deep_link_bitbucket_git(self):
        filename = os.path.join(CODE_ROOT, 'bitbucket', 'org-name',
                                'git-repo-name', 'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename))

        self.assertEqual(
            'https://bitbucket.org/org-name/git-repo-name/src/master/somedir/sourcefile.py',
            dl)
Пример #6
0
    def test_deep_link_github_with_lineno(self):
        filename = os.path.join(CODE_ROOT, 'github', 'org-name',
                                'repositoryname', 'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename), lineno=42)

        self.assertEqual(
            'https://github.com/org-name/repositoryname/blob/master/somedir/sourcefile.py#L42',
            dl)
    def test_deep_link_github_with_lineno(self, ORG_NAMES):
        self._setupmock(ORG_NAMES)
        ORG_NAMES['github'] = 'ghorgname'
        filename = os.path.join(CODE_ROOT, 'github', 'repositoryname',
                                'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename), lineno=42)

        self.assertEqual(
            'https://github.com/ghorgname/repositoryname/blob/master/somedir/sourcefile.py#L42',
            dl)
    def test_deep_link_bitbucket_hg_with_lineno(self, ORG_NAMES):
        self._setupmock(ORG_NAMES)
        ORG_NAMES['bitbucket'] = 'bborgname'
        filename = os.path.join(CODE_ROOT, 'bitbucket', 'hg-repo-name',
                                'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename), lineno=42)

        self.assertEqual(
            'https://bitbucket.org/bborgname/hg-repo-name/src/default/somedir/sourcefile.py#sourcefile.py-42',
            dl)
    def test_deep_link_bitbucket_git(self, ORG_NAMES):
        self._setupmock(ORG_NAMES)
        ORG_NAMES['bitbucket'] = 'bborgname'
        filename = os.path.join(CODE_ROOT, 'bitbucket', 'git-repo-name',
                                'somedir', 'sourcefile.py')
        dl = deep_link(*get_repo_and_filepath(filename))

        self.assertEqual(
            'https://bitbucket.org/bborgname/git-repo-name/src/master/somedir/sourcefile.py',
            dl)