diff --git a/setup.py b/setup.py index b342b01..1fdaf23 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,6 @@ setup( scripts=['src/phid'], setup_requires=['pytest-runner'], - install_requires=['aiohttp==2.3.8', 'pyYAML', 'ldap3'], - tests_require=['pytest', 'pytest-aiohttp'] + install_requires=['pyYAML', 'ldap3'], + tests_require=['pytest'] ) diff --git a/test/conftest.py b/test/conftest.py index 65f087a..4b0e168 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,6 +1,6 @@ import pytest import phi.ldap.client -import phi.api.app +# import phi.api.app @pytest.fixture @@ -18,17 +18,17 @@ def ldap_client(): client.close() -@pytest.fixture -def api_app(): - return phi.api.app.api_app({ - 'ldap': { - 'host': 'localhost', - 'port': 389, - 'encryption': 'TLSv1.2', - 'ciphers': 'HIGH', - 'validate': 'False', - 'username': 'uid=phi,ou=Services,dc=unit,dc=macaomilano,dc=org', - 'password': 'phi', - 'base_dn': 'dc=unit,dc=macaomilano,dc=org', - 'attribute_id': 'uid', - 'attribute_mail': 'mail'}}) +# @pytest.fixture +# def api_app(): +# return phi.api.app.api_app({ +# 'ldap': { +# 'host': 'localhost', +# 'port': 389, +# 'encryption': 'TLSv1.2', +# 'ciphers': 'HIGH', +# 'validate': 'False', +# 'username': 'uid=phi,ou=Services,dc=unit,dc=macaomilano,dc=org', +# 'password': 'phi', +# 'base_dn': 'dc=unit,dc=macaomilano,dc=org', +# 'attribute_id': 'uid', +# 'attribute_mail': 'mail'}}) diff --git a/test/test_api.py b/test/test_api.py index 918e67b..481384b 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -1,15 +1,15 @@ -async def test_user_request_not_valid(test_client, api_app): - client = await test_client(api_app) +# async def test_user_request_not_valid(test_client, api_app): +# client = await test_client(api_app) - resp = await client.get('/user') - assert resp.status == 422 - resp = None +# resp = await client.get('/user') +# assert resp.status == 422 +# resp = None - resp = await client.get('/user/') - assert resp.status == 422 +# resp = await client.get('/user/') +# assert resp.status == 422 -async def test_user_not_found(test_client, api_app): - client = await test_client(api_app) - resp = await client.get('/user/nonexistent') - assert resp.status == 404 +# async def test_user_not_found(test_client, api_app): +# client = await test_client(api_app) +# resp = await client.get('/user/nonexistent') +# assert resp.status == 404