Daemon now must be async (more consistent)

This commit is contained in:
Jef Roosens 2020-08-27 13:06:22 +02:00
parent f6f081bfba
commit e7637a1bce
3 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,7 @@
# =====IMPORTS=====
# Third-party imports
import pytest
# Own imports
from frank import default, command, daemon
@ -27,7 +30,7 @@ class TestDecorators:
return 'daemon'
@daemon()
def daemon_dec(self):
async def daemon_dec(self):
return self.daemon_no_dec()
def test_default(self):
@ -36,5 +39,6 @@ class TestDecorators:
def test_command(self):
assert self.command_no_dec() == self.command_dec()
def test_daemon(self):
assert self.daemon_no_dec() == self.daemon_dec()
@pytest.mark.asyncio
async def test_daemon(self):
assert self.daemon_no_dec() == await self.daemon_dec()