Commit 1eabaaac authored by Meet Mangukiya's avatar Meet Mangukiya

test_repository: Add tests for repository interface

Adds to #38
parent 96691901
Pipeline #8876904 passed with stage
in 3 minutes and 12 seconds
from unittest.mock import MagicMock
import git
from IGitt.Interfaces.Repository import Repository
git.Repo.clone_from = MagicMock()
git.Repo.clone_from.return_value = git.Repo()
test_repo = type('MockRepo', (Repository, ),
{'clone_url': ''})
repo, path = test_repo().get_clone()
assert isinstance(repo, git.Repo)
assert 'tmp' in path
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment