# Path: api/tests/utils.py
# class APITestCase(TestCase):
#     @run_sync
#     async def tearDown(self):
#         await clear_index()
#         await refresh_index()
# 
#     def get(self, path, *args, **kwargs):
#         return requests.get(
#             urljoin('http://127.0.0.1:8000', path), *args, **kwargs)
# 
# def run_sync(coro):
#     @wraps(coro)
#     def wrapper(*args, **kwargs):
#         future = coro(*args, **kwargs)
#         loop = asyncio.get_event_loop()
#         return loop.run_until_complete(future)
#     return wrapper
# 
# Path: api/tests/factories.py
# class Event(Factory):
#     doc_type = 'event'


from ..utils import APITestCase, run_sync
from ..factories import Event


class EventListTestCase(APITestCase):
    def test_ok_by_default(self):
        response = self.get('/v1/events/')
        self.assertEqual(response.status_code, 200)



# Path: api/tests/utils.py
# class APITestCase(TestCase):
#     @run_sync
#     async def tearDown(self):
#         await clear_index()
#         await refresh_index()
# 
#     def get(self, path, *args, **kwargs):
#         return requests.get(
#             urljoin('http://127.0.0.1:8000', path), *args, **kwargs)
# 
# def run_sync(coro):
#     @wraps(coro)
#     def wrapper(*args, **kwargs):
#         future = coro(*args, **kwargs)
#         loop = asyncio.get_event_loop()
#         return loop.run_until_complete(future)
#     return wrapper
# 
# Path: api/tests/factories.py
# class Event(Factory):
#     doc_type = 'event'


# Path: api/tests/v1/test_events.py
from ..utils import APITestCase, run_sync
from ..factories import Event



class EventListTestCase(APITestCase):
    def test_ok_by_default(self):
        response = self.get('/v1/events/')
        self.assertEqual(response.status_code, 200)



class EventTestCase(APITestCase):