Skip to content

Commit 65994ca

Browse files
authored
Merge pull request modelcontextprotocol#2959 from UmakanthKaspa/add-git-status-test
Add test for git_status function
2 parents 6205ff7 + 2c8bb9d commit 65994ca

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/git/tests/test_server.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
from pathlib import Path
33
import git
4-
from mcp_server_git.server import git_checkout, git_branch, git_add
4+
from mcp_server_git.server import git_checkout, git_branch, git_add, git_status
55
import shutil
66

77
@pytest.fixture
@@ -91,3 +91,9 @@ def test_git_add_specific_files(test_repository):
9191
assert "file1.txt" in staged_files
9292
assert "file2.txt" not in staged_files
9393
assert result == "Files staged successfully"
94+
95+
def test_git_status(test_repository):
96+
result = git_status(test_repository)
97+
98+
assert result is not None
99+
assert "On branch" in result or "branch" in result.lower()

0 commit comments

Comments
 (0)