

def test_remotes(self):
    '\n        Test setting a remote (git.remote_set), and getting a remote\n        (git.remote_get and git.remotes)\n\n        TODO: Properly mock fetching a remote (git.fetch), and build out more\n        robust testing that confirms that the https auth bits work.\n        '
    remotes = {
        'first': {
            'fetch': '/dev/null',
            'push': '/dev/null',
        },
        'second': {
            'fetch': '/dev/null',
            'push': '/dev/stdout',
        },
    }
    self.assertEqual(self.run_function('git.remote_set', [self.repo, remotes['first']['fetch']], remote='first'), remotes['first'])
    self.assertEqual(self.run_function('git.remote_set', [self.repo, remotes['second']['fetch']], remote='second', push_url=remotes['second']['push']), remotes['second'])
    self.assertEqual(self.run_function('git.remotes', [self.repo]), remotes)

dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py GitModuleTest.test_remotes/original