MCPcopy
hub / github.com/timbrel/GitSavvy / test_active_local_branch

Method test_active_local_branch

tests/test_git_mixins.py:88–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

86 ])
87
88 def test_active_local_branch(self):
89 repo = GitCommand()
90 git_output = join0(
91 ["*", "refs/heads/master", "refs/remotes/origin/master", "origin", ""]
92 + date_sha_and_subject)
93 when(repo).git("for-each-ref", ...).thenReturn(git_output)
94 when(repo).get_repo_path().thenReturn("yeah/sure")
95 actual = repo.get_branches()
96 self.assertEqual(actual, [
97 git_mixins.branches.Branch(
98 "master",
99 None,
100 "master",
101 "89b79cd737465ed308ecc00289d00a6f923f2da5",
102 "The Subject",
103 True,
104 False,
105 0,
106 git_mixins.branches.Upstream(
107 "origin", "master", "origin/master", ""
108 )
109 )
110 ])
111
112 def test_remote_branch(self):
113 repo = GitCommand()

Callers

nothing calls this directly

Calls 6

GitCommandClass · 0.90
whenFunction · 0.90
thenReturnMethod · 0.80
gitMethod · 0.80
get_repo_pathMethod · 0.80
get_branchesMethod · 0.80

Tested by

no test coverage detected