(self)
| 62 | |
| 63 | class TestGetBranchesParsing(TestGitMixinsUsage): |
| 64 | def test_local_branch(self): |
| 65 | repo = GitCommand() |
| 66 | git_output = join0( |
| 67 | [" ", "refs/heads/master", "refs/remotes/origin/master", "origin", ""] |
| 68 | + date_sha_and_subject) |
| 69 | when(repo).git("for-each-ref", ...).thenReturn(git_output) |
| 70 | when(repo).get_repo_path().thenReturn("yeah/sure") |
| 71 | actual = repo.get_branches() |
| 72 | self.assertEqual(actual, [ |
| 73 | git_mixins.branches.Branch( |
| 74 | "master", |
| 75 | None, |
| 76 | "master", |
| 77 | "89b79cd737465ed308ecc00289d00a6f923f2da5", |
| 78 | "The Subject", |
| 79 | False, |
| 80 | False, |
| 81 | 0, |
| 82 | git_mixins.branches.Upstream( |
| 83 | "origin", "master", "origin/master", "" |
| 84 | ) |
| 85 | ) |
| 86 | ]) |
| 87 | |
| 88 | def test_active_local_branch(self): |
| 89 | repo = GitCommand() |
nothing calls this directly
no test coverage detected