aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests/utils/resources.py
blob: d9e49750c461ddad12c9d1d8a09107bbacf06229 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
# -*- encoding: utf-8 -*-

from .base import Resource


class Simple(Resource):
    pass


class HasSimple(Resource):
    _maps = {'simple': Simple}


class Nested(Resource):
    _dates = ('date', )
    _maps = {'simple': Simple, 'self_nested': 'self'}
    _collection_maps = {
        'list_collection': HasSimple,
        'items_collections': HasSimple,
        'self_nested_list': 'self',
        'self_nested_dict': 'self',
    }