[V3] Add some tests (#1590)

* Add some tests related to economy

* Add a test for repo removal

* black style formatting
This commit is contained in:
palmtree5
2018-06-09 18:00:21 -08:00
committed by Will
parent 3759fce090
commit 7b825f2cd7
2 changed files with 36 additions and 0 deletions

View File

@@ -110,6 +110,18 @@ async def test_add_repo(monkeypatch, repo_manager):
assert squid.available_modules == []
@pytest.mark.asyncio
async def test_remove_repo(monkeypatch, repo_manager):
monkeypatch.setattr("redbot.cogs.downloader.repo_manager.Repo._run", fake_run_noprint)
await repo_manager.add_repo(
url="https://github.com/tekulvw/Squid-Plugins", name="squid", branch="rewrite_cogs"
)
assert repo_manager.get_repo("squid") is not None
await repo_manager.delete_repo("squid")
assert repo_manager.get_repo("squid") is None
@pytest.mark.asyncio
async def test_current_branch(bot_repo):
branch = await bot_repo.current_branch()