-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_git.py
More file actions
26 lines (18 loc) · 844 Bytes
/
test_git.py
File metadata and controls
26 lines (18 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pytest
from codesphere.resources.workspace import Workspace
pytestmark = pytest.mark.integration
class TestGitIntegration:
@pytest.mark.asyncio
async def test_get_head(self, workspace_with_git: Workspace):
result = await workspace_with_git.git.get_head()
assert result.head is not None
assert len(result.head) > 0
@pytest.mark.asyncio
async def test_pull_default(self, workspace_with_git: Workspace):
await workspace_with_git.git.pull()
@pytest.mark.asyncio
async def test_pull_with_remote(self, workspace_with_git: Workspace):
await workspace_with_git.git.pull(remote="origin")
@pytest.mark.asyncio
async def test_pull_with_remote_and_branch(self, workspace_with_git: Workspace):
await workspace_with_git.git.pull(remote="origin", branch="master")