# Path: nuka/tasks/service.py
# class start(Task):
# class restart(Task):
# class reload(Task):
# class stop(Task):
#     def __init__(self, name=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, services=None, **kwargs):
#     def do(self):
#     def __init__(self, services=None, **kwargs):
#     def do(self):
#     def __init__(self, name=None, **kwargs):
#     def do(self):
#     def diff(self):
# 
# Path: nuka/tasks/apt.py
# GPG_HEADER = b'-----BEGIN PGP PUBLIC KEY BLOCK-----'
# def apt_watcher(delay, fd):
#     def watcher(task, process):
#     def __init__(self, name=None, src=None, key=None, update=True, **kwargs):
#     def add_key(self, key):
#     def do(self):
#     def diff(self):
#     def __init__(self, cache=None, **kwargs):
#     def do(self):
#     def __init__(self, update_cache=None, **kwargs):
#     def do(self):
#     def __init__(self, packages, **kwargs):
#     def do(self):
#     def __init__(self, packages=None, debconf=None,
#                  debian_frontend='noninteractive', **kwargs):
#     def do(self):
#     def __init__(self, selections=None, **kwargs):
#     def do(self):
#     def __init__(self, packages=None, debconf=None,
#                  debian_frontend='noninteractive', debian_priority=None,
#                  update_cache=None, install_recommends=False, **kwargs):
#     def get_packages_list(self, packages):
#     def do(self):
#     def diff(self):
# class source(Task):
# class update(Task):
# class list(Task):
# class search(Task):
# class upgrade(Task):
# class debconf_set_selections(Task):
# class install(Task):


from nuka.tasks import service
from nuka.tasks import apt
import pytest
import os


@pytest.mark.asyncio
async def test_start_doc(host):
    await service.start('rsync')


@pytest.mark.asyncio
async def test_restart_doc(host):
    await service.restart('rsync')


@pytest.mark.asyncio
async def test_stop_doc(host):
    await service.stop('rsync')


@pytest.mark.asyncio
async def test_service(host):
    assert await service.stop('rsync')
    assert await service.stop('rsync')
    assert await service.restart('rsync')
    assert await service.start('rsync')
    assert await service.stop('rsync')
    assert await service.start('rsync')
    assert await service.restart('rsync')


@pytest.mark.asyncio
async def test_service_diff(host, diff_mode):

# Path: nuka/tasks/service.py
# class start(Task):
# class restart(Task):
# class reload(Task):
# class stop(Task):
#     def __init__(self, name=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, services=None, **kwargs):
#     def do(self):
#     def __init__(self, services=None, **kwargs):
#     def do(self):
#     def __init__(self, name=None, **kwargs):
#     def do(self):
#     def diff(self):
# 
# Path: nuka/tasks/apt.py
# GPG_HEADER = b'-----BEGIN PGP PUBLIC KEY BLOCK-----'
# def apt_watcher(delay, fd):
#     def watcher(task, process):
#     def __init__(self, name=None, src=None, key=None, update=True, **kwargs):
#     def add_key(self, key):
#     def do(self):
#     def diff(self):
#     def __init__(self, cache=None, **kwargs):
#     def do(self):
#     def __init__(self, update_cache=None, **kwargs):
#     def do(self):
#     def __init__(self, packages, **kwargs):
#     def do(self):
#     def __init__(self, packages=None, debconf=None,
#                  debian_frontend='noninteractive', **kwargs):
#     def do(self):
#     def __init__(self, selections=None, **kwargs):
#     def do(self):
#     def __init__(self, packages=None, debconf=None,
#                  debian_frontend='noninteractive', debian_priority=None,
#                  update_cache=None, install_recommends=False, **kwargs):
#     def get_packages_list(self, packages):
#     def do(self):
#     def diff(self):
# class source(Task):
# class update(Task):
# class list(Task):
# class search(Task):
# class upgrade(Task):
# class debconf_set_selections(Task):
# class install(Task):


# Path: tests/tasks/test_service.py
from nuka.tasks import service
from nuka.tasks import apt
import pytest
import os



@pytest.mark.asyncio
async def test_start_doc(host):
    await service.start('rsync')


@pytest.mark.asyncio
async def test_restart_doc(host):
    await service.restart('rsync')


@pytest.mark.asyncio
async def test_stop_doc(host):
    await service.stop('rsync')


@pytest.mark.asyncio
async def test_service(host):
    assert await service.stop('rsync')
    assert await service.stop('rsync')
    assert await service.restart('rsync')
    assert await service.start('rsync')
    assert await service.stop('rsync')
    assert await service.start('rsync')
    assert await service.restart('rsync')


@pytest.mark.asyncio
async def test_service_diff(host, diff_mode):

    assert await service.stop('rsync')