You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/07/08 00:11:23 UTC

[06/16] allura git commit: Mock the __ming__ (Mock doesn't do this automatically) so that if we try to cache the tags/branches, it doesn't error out

Mock the __ming__ (Mock doesn't do this automatically) so that if we try to cache the tags/branches, it doesn't error out


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/0fd24ba4
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/0fd24ba4
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/0fd24ba4

Branch: refs/heads/db/6373
Commit: 0fd24ba4cc7f1d4d49a774cdabf3fe650478737e
Parents: 14edf90
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Jul 2 14:38:33 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jul 2 14:38:33 2015 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/tests/model/test_repository.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/0fd24ba4/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index c28daf1..4cfd2ef 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -746,6 +746,7 @@ class TestGitImplementation(unittest.TestCase):
         repo_dir = pkg_resources.resource_filename(
             'forgegit', 'tests/data/testgit.git')
         repo = mock.Mock(full_fs_path=repo_dir)
+        repo.__ming__ = mock.Mock()
         repo.cached_branches = []
         impl = GM.git_repo.GitImplementation(repo)
         self.assertEqual(impl.branches, [
@@ -759,6 +760,7 @@ class TestGitImplementation(unittest.TestCase):
         repo_dir = pkg_resources.resource_filename(
             'forgegit', 'tests/data/testgit.git')
         repo = mock.Mock(full_fs_path=repo_dir)
+        repo.__ming__ = mock.Mock()
         repo.cached_tags = []
         impl = GM.git_repo.GitImplementation(repo)
         self.assertEqual(impl.tags, [