##// END OF EJS Templates
tests: fixed some git tests for lfs modules
super-admin -
r5151:3cdc843a default
parent child Browse files
Show More
@@ -1201,9 +1201,10 b' class TestGetSubmoduleUrl(object):'
1201 def test_submodules_file_found(self):
1201 def test_submodules_file_found(self):
1202 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1202 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1203 node = mock.Mock()
1203 node = mock.Mock()
1204
1204 with mock.patch.object(
1205 with mock.patch.object(
1205 commit, 'get_node', return_value=node) as get_node_mock:
1206 commit, 'get_node', return_value=node) as get_node_mock:
1206 node.content = (
1207 node.str_content = (
1207 '[submodule "subrepo1"]\n'
1208 '[submodule "subrepo1"]\n'
1208 '\tpath = subrepo1\n'
1209 '\tpath = subrepo1\n'
1209 '\turl = https://code.rhodecode.com/dulwich\n'
1210 '\turl = https://code.rhodecode.com/dulwich\n'
@@ -1215,9 +1216,10 b' class TestGetSubmoduleUrl(object):'
1215 def test_complex_submodule_path(self):
1216 def test_complex_submodule_path(self):
1216 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1217 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1217 node = mock.Mock()
1218 node = mock.Mock()
1219
1218 with mock.patch.object(
1220 with mock.patch.object(
1219 commit, 'get_node', return_value=node) as get_node_mock:
1221 commit, 'get_node', return_value=node) as get_node_mock:
1220 node.content = (
1222 node.str_content = (
1221 '[submodule "complex/subrepo/path"]\n'
1223 '[submodule "complex/subrepo/path"]\n'
1222 '\tpath = complex/subrepo/path\n'
1224 '\tpath = complex/subrepo/path\n'
1223 '\turl = https://code.rhodecode.com/dulwich\n'
1225 '\turl = https://code.rhodecode.com/dulwich\n'
@@ -1236,9 +1238,10 b' class TestGetSubmoduleUrl(object):'
1236 def test_path_not_found(self):
1238 def test_path_not_found(self):
1237 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1239 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1238 node = mock.Mock()
1240 node = mock.Mock()
1241
1239 with mock.patch.object(
1242 with mock.patch.object(
1240 commit, 'get_node', return_value=node) as get_node_mock:
1243 commit, 'get_node', return_value=node) as get_node_mock:
1241 node.content = (
1244 node.str_content = (
1242 '[submodule "subrepo1"]\n'
1245 '[submodule "subrepo1"]\n'
1243 '\tpath = subrepo1\n'
1246 '\tpath = subrepo1\n'
1244 '\turl = https://code.rhodecode.com/dulwich\n'
1247 '\turl = https://code.rhodecode.com/dulwich\n'
@@ -1250,9 +1253,10 b' class TestGetSubmoduleUrl(object):'
1250 def test_returns_cached_values(self):
1253 def test_returns_cached_values(self):
1251 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1254 commit = GitCommit(repository=mock.Mock(), raw_id='abcdef12', idx=1)
1252 node = mock.Mock()
1255 node = mock.Mock()
1256
1253 with mock.patch.object(
1257 with mock.patch.object(
1254 commit, 'get_node', return_value=node) as get_node_mock:
1258 commit, 'get_node', return_value=node) as get_node_mock:
1255 node.content = (
1259 node.str_content = (
1256 '[submodule "subrepo1"]\n'
1260 '[submodule "subrepo1"]\n'
1257 '\tpath = subrepo1\n'
1261 '\tpath = subrepo1\n'
1258 '\turl = https://code.rhodecode.com/dulwich\n'
1262 '\turl = https://code.rhodecode.com/dulwich\n'
General Comments 0
You need to be logged in to leave comments. Login now