forked from github.com/blag
add missing docstrings
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
"""Tests for the quickstart module."""
|
||||
|
||||
|
||||
# remove when we don't support py38 anymore
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -9,21 +12,24 @@ from blag.quickstart import get_input, quickstart
|
||||
|
||||
|
||||
def test_get_input_default_answer(monkeypatch: MonkeyPatch) -> None:
|
||||
"""Test get_input with default answer."""
|
||||
monkeypatch.setattr("builtins.input", lambda x: "")
|
||||
answer = get_input("foo", "bar")
|
||||
assert answer == "bar"
|
||||
|
||||
|
||||
def test_get_input(monkeypatch: MonkeyPatch) -> None:
|
||||
"""Test get_input."""
|
||||
monkeypatch.setattr("builtins.input", lambda x: "baz")
|
||||
answer = get_input("foo", "bar")
|
||||
assert answer == "baz"
|
||||
|
||||
|
||||
def test_quickstart(cleandir: str, monkeypatch: MonkeyPatch) -> None:
|
||||
"""Test quickstart."""
|
||||
monkeypatch.setattr("builtins.input", lambda x: "foo")
|
||||
quickstart(None)
|
||||
with open("config.ini", "r") as fh:
|
||||
with open("config.ini") as fh:
|
||||
data = fh.read()
|
||||
assert "base_url = foo" in data
|
||||
assert "title = foo" in data
|
||||
|
||||
Reference in New Issue
Block a user