File: test_preflight_handler.py

package info (click to toggle)
aiohttp-cors 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 308 kB
  • sloc: python: 1,780; makefile: 6
file content (12 lines) | stat: -rw-r--r-- 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from unittest import mock

import pytest

from aiohttp_cors.preflight_handler import _PreflightHandler


async def test_raises_when_handler_not_extend():
    request = mock.Mock()
    handler = _PreflightHandler()
    with pytest.raises(NotImplementedError):
        await handler._get_config(request, "origin", "GET")