File: a_nested_module.py

package info (click to toggle)
python-web-poet 0.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 908 kB
  • sloc: python: 6,112; makefile: 19
file content (21 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from url_matcher import Patterns

from tests.po_lib import POBase
from web_poet import ItemPage, handle_urls


class PONestedModuleOverriden(ItemPage): ...


@handle_urls(
    include=["example.com", "example.org"],
    exclude=["/*.jpg|"],
    instead_of=PONestedModuleOverriden,
)
class PONestedModule(POBase):
    expected_instead_of = PONestedModuleOverriden
    expected_patterns = Patterns(
        include=["example.com", "example.org"], exclude=["/*.jpg|"]
    )
    expected_to_return = None
    expected_meta = {}