Exemplo n.º 1
0
def test_rename_repo(mock_write, _):
    repos = {
        "r1": {
            "path": "/a/b",
            "type": None
        },
        "r2": {
            "path": "/c/c",
            "type": None
        }
    }
    utils.rename_repo(repos, "r2", "xxx")
    mock_write.assert_called_once_with(repos, "w")
Exemplo n.º 2
0
def test_rename_repo(mock_write):
    utils.rename_repo(
        {
            'r1': {
                'path': '/a/b',
                'type': None
            },
            'r2': {
                'path': '/c/c',
                'type': None
            }
        }, 'r2', 'xxx')
    mock_write.assert_called_once_with([('/a/b', 'r1', None),
                                        ('/c/c', 'xxx', None)], 'w')
Exemplo n.º 3
0
def test_rename_repo(mock_write):
    utils.rename_repo({'r1': '/a/b', 'r2': '/c/c'}, 'r2', 'xxx')
    mock_write.assert_called_once_with({'r1': '/a/b', 'xxx': '/c/c'}, 'w')