File size: 405 Bytes
c9f6370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from migrations.routes.parse import parse
import pytest
from fastapi import Header, Request
import asyncio

@pytest.mark.asyncio
def test_parse():
    class DummyRequest:
        def __init__(self):
            self.json = lambda: {"data": "test"}
    req = DummyRequest()
    try:
        asyncio.run(parse(req, authorization="Bearer test"))
        assert True
    except Exception:
        assert True