def test_get_remote_with_name(self): with mock.patch('doc2git.cmdline.run') as runmock: runmock.return_value = self.cmdout self.assertEqual(get_remote('github', 'foo'), '[email protected]:foo/bar.git')
def test_get_first_remote(self): with mock.patch('doc2git.cmdline.run') as runmock: runmock.return_value = self.cmdout self.assertEqual(get_remote('github'), '[email protected]:user/repo.git')