summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-04-08 04:08:59 +0300
committerDevaev Maxim <[email protected]>2019-04-08 04:08:59 +0300
commit7eca51f17b7c2c95b54d4c2b77caa6c8554ef4f4 (patch)
tree70c101f89506f4602223b0d2029ff3a6c70ce522
parent28c556d92e4c6ad1b02bf0606a456eae0bcadf90 (diff)
refactoring
-rw-r--r--tests/test_aioregion.py8
-rw-r--r--tests/test_app_htpasswd.py12
-rw-r--r--tests/test_validators_net.py2
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_aioregion.py b/tests/test_aioregion.py
index 72435adf..dde0918b 100644
--- a/tests/test_aioregion.py
+++ b/tests/test_aioregion.py
@@ -30,7 +30,7 @@ from kvmd.aioregion import AioExclusiveRegion
# =====
@pytest.mark.asyncio
-async def test_aioregion__one__ok(event_loop: asyncio.AbstractEventLoop) -> None:
+async def test_ok__aioregion__one(event_loop: asyncio.AbstractEventLoop) -> None:
_ = event_loop
region = AioExclusiveRegion(RegionIsBusyError)
@@ -48,7 +48,7 @@ async def test_aioregion__one__ok(event_loop: asyncio.AbstractEventLoop) -> None
@pytest.mark.asyncio
-async def test_aioregion__one__fail(event_loop: asyncio.AbstractEventLoop) -> None:
+async def test_fail__aioregion__one(event_loop: asyncio.AbstractEventLoop) -> None:
_ = event_loop
region = AioExclusiveRegion(RegionIsBusyError)
@@ -69,7 +69,7 @@ async def test_aioregion__one__fail(event_loop: asyncio.AbstractEventLoop) -> No
# =====
@pytest.mark.asyncio
-async def test_aioregion__two__ok(event_loop: asyncio.AbstractEventLoop) -> None:
+async def test_ok__aioregion__two(event_loop: asyncio.AbstractEventLoop) -> None:
region = AioExclusiveRegion(RegionIsBusyError)
async def func1() -> None:
@@ -92,7 +92,7 @@ async def test_aioregion__two__ok(event_loop: asyncio.AbstractEventLoop) -> None
@pytest.mark.asyncio
-async def test_aioregion__two__fail(event_loop: asyncio.AbstractEventLoop) -> None:
+async def test_fail__aioregion__two(event_loop: asyncio.AbstractEventLoop) -> None:
region = AioExclusiveRegion(RegionIsBusyError)
async def func1() -> None:
diff --git a/tests/test_app_htpasswd.py b/tests/test_app_htpasswd.py
index 124a7b2b..71d34fff 100644
--- a/tests/test_app_htpasswd.py
+++ b/tests/test_app_htpasswd.py
@@ -64,7 +64,7 @@ def _run_main(htpasswd: passlib.apache.HtpasswdFile, cmd: List[str]) -> None:
# =====
-def test_main__list(htpasswd: passlib.apache.HtpasswdFile, capsys) -> None: # type: ignore
+def test_ok__main_list(htpasswd: passlib.apache.HtpasswdFile, capsys) -> None: # type: ignore
_run_main(htpasswd, ["list"])
(out, err) = capsys.readouterr()
assert len(err) == 0
@@ -72,7 +72,7 @@ def test_main__list(htpasswd: passlib.apache.HtpasswdFile, capsys) -> None: # t
# =====
-def test_main__set__change_stdin(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
+def test_ok__main_set__change_stdin(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
old_users = set(htpasswd.users())
if old_users:
assert htpasswd.check_password("admin", _make_passwd("admin"))
@@ -85,7 +85,7 @@ def test_main__set__change_stdin(htpasswd: passlib.apache.HtpasswdFile, mocker)
assert old_users == set(htpasswd.users())
-def test_main__set__add_stdin(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
+def test_ok__main_set__add_stdin(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
old_users = set(htpasswd.users())
if old_users:
mocker.patch.object(builtins, "input", (lambda: " test "))
@@ -97,7 +97,7 @@ def test_main__set__add_stdin(htpasswd: passlib.apache.HtpasswdFile, mocker) ->
# =====
-def test_main__set__change_getpass__ok(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
+def test_ok__main_set__change_getpass(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
old_users = set(htpasswd.users())
if old_users:
assert htpasswd.check_password("admin", _make_passwd("admin"))
@@ -110,7 +110,7 @@ def test_main__set__change_getpass__ok(htpasswd: passlib.apache.HtpasswdFile, mo
assert old_users == set(htpasswd.users())
-def test_main__set__change_getpass__fail(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
+def test_fail__main_set__change_getpass(htpasswd: passlib.apache.HtpasswdFile, mocker) -> None: # type: ignore
old_users = set(htpasswd.users())
if old_users:
assert htpasswd.check_password("admin", _make_passwd("admin"))
@@ -138,7 +138,7 @@ def test_main__set__change_getpass__fail(htpasswd: passlib.apache.HtpasswdFile,
# =====
-def test_main__del(htpasswd: passlib.apache.HtpasswdFile) -> None:
+def test_ok__main_del(htpasswd: passlib.apache.HtpasswdFile) -> None:
old_users = set(htpasswd.users())
if old_users:
diff --git a/tests/test_validators_net.py b/tests/test_validators_net.py
index 33c31f6d..eab67c9a 100644
--- a/tests/test_validators_net.py
+++ b/tests/test_validators_net.py
@@ -79,7 +79,7 @@ def test_ok__valid_ip(arg: Any) -> None:
"",
None,
])
-def test__fail_valid_ip(arg: Any) -> None:
+def test_fail__valid_ip(arg: Any) -> None:
with pytest.raises(ValidatorError):
print(valid_ip(arg))