tests: fixed some git tests for lfs modules
This commit is contained in:
parent
d886335b3e
commit
d35897dfcc
1 changed files with 8 additions and 4 deletions
|
|
@ -1201,9 +1201,10 @@ class TestGetSubmoduleUrl(object):
|
|||
def test_submodules_file_found(self):
|
||||
commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
|
||||
node = mock.Mock()
|
||||
|
||||
with mock.patch.object(
|
||||
commit, 'get_node', return_value=node) as get_node_mock:
|
||||
node.content = (
|
||||
node.str_content = (
|
||||
'[submodule "subrepo1"]\n'
|
||||
'\tpath = subrepo1\n'
|
||||
'\turl = https://code.rhodecode.com/dulwich\n'
|
||||
|
|
@ -1215,9 +1216,10 @@ class TestGetSubmoduleUrl(object):
|
|||
def test_complex_submodule_path(self):
|
||||
commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
|
||||
node = mock.Mock()
|
||||
|
||||
with mock.patch.object(
|
||||
commit, 'get_node', return_value=node) as get_node_mock:
|
||||
node.content = (
|
||||
node.str_content = (
|
||||
'[submodule "complex/subrepo/path"]\n'
|
||||
'\tpath = complex/subrepo/path\n'
|
||||
'\turl = https://code.rhodecode.com/dulwich\n'
|
||||
|
|
@ -1236,9 +1238,10 @@ class TestGetSubmoduleUrl(object):
|
|||
def test_path_not_found(self):
|
||||
commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
|
||||
node = mock.Mock()
|
||||
|
||||
with mock.patch.object(
|
||||
commit, 'get_node', return_value=node) as get_node_mock:
|
||||
node.content = (
|
||||
node.str_content = (
|
||||
'[submodule "subrepo1"]\n'
|
||||
'\tpath = subrepo1\n'
|
||||
'\turl = https://code.rhodecode.com/dulwich\n'
|
||||
|
|
@ -1250,9 +1253,10 @@ class TestGetSubmoduleUrl(object):
|
|||
def test_returns_cached_values(self):
|
||||
commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
|
||||
node = mock.Mock()
|
||||
|
||||
with mock.patch.object(
|
||||
commit, 'get_node', return_value=node) as get_node_mock:
|
||||
node.content = (
|
||||
node.str_content = (
|
||||
'[submodule "subrepo1"]\n'
|
||||
'\tpath = subrepo1\n'
|
||||
'\turl = https://code.rhodecode.com/dulwich\n'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue