File: fixtures.py

package info (click to toggle)
python-xsdata 24.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,936 kB
  • sloc: python: 29,257; xml: 404; makefile: 27; sh: 6
file content (94 lines) | stat: -rw-r--r-- 3,842 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
from tests.fixtures.books import Books, BookForm
from xsdata.models.datatype import XmlDate

books = Books(
    book=[
        BookForm(
            id="bk001",
            author="Hightower, Kim",
            title="The First Book",
            genre="Fiction",
            price=44.95,
            pub_date=XmlDate(2000, 10, 1),
            review="An amazing story of nothing.",
        ),
        BookForm(
            id="bk002",
            author="Nagata, Suanne",
            title="Becoming Somebody",
            genre="Biography",
            price=33.95,
            pub_date=XmlDate(2001, 1, 10),
            review="A masterpiece of the fine art of gossiping.",
        ),
    ]
)
events = [
    ('start-ns', 'brk', 'urn:books'),
    ('start', '{urn:books}books', {}, {'brk': 'urn:books'}),
    ('start', 'book', {'id': 'bk001', 'lang': 'en'}, {'brk': 'urn:books'}),
    ('start', 'author', {}, {'brk': 'urn:books'}),
    ('end', 'author', 'Hightower, Kim', '\n    '),
    ('start', 'title', {}, {'brk': 'urn:books'}),
    ('end', 'title', 'The First Book', '\n    '),
    ('start', 'genre', {}, {'brk': 'urn:books'}),
    ('end', 'genre', 'Fiction', '\n    '),
    ('start', 'price', {}, {'brk': 'urn:books'}),
    ('end', 'price', '44.95', '\n    '),
    ('start', 'pub_date', {}, {'brk': 'urn:books'}),
    ('end', 'pub_date', '2000-10-01', '\n    '),
    ('start', 'review', {}, {'brk': 'urn:books'}),
    ('end', 'review', 'An amazing story of nothing.', '\n  '),
    ('end', 'book', '\n    ', '\n  '),
    ('start', 'book', {'id': 'bk002', 'lang': 'en'}, {'brk': 'urn:books'}),
    ('start', 'author', {}, {'brk': 'urn:books'}),
    ('end', 'author', 'Nagata, Suanne', '\n    '),
    ('start', 'title', {}, {'brk': 'urn:books'}),
    ('end', 'title', 'Becoming Somebody', '\n    '),
    ('start', 'genre', {}, {'brk': 'urn:books'}),
    ('end', 'genre', 'Biography', '\n    '),
    ('start', 'price', {}, {'brk': 'urn:books'}),
    ('end', 'price', '33.95', '\n    '),
    ('start', 'pub_date', {}, {'brk': 'urn:books'}),
    ('end', 'pub_date', '2001-01-10', '\n    '),
    ('start', 'review', {}, {'brk': 'urn:books'}),
    ('end', 'review', 'A masterpiece of the fine art of gossiping.', '\n  '),
    ('end', 'book', '\n    ', '\n'),
    ('end', '{urn:books}books', '\n  ', None)
]

events_default_ns = [
    ("start-ns", None, "urn:books"),
    ("start", "{urn:books}books", {}, {None: "urn:books"}),
    ("start-ns", None, ""),
    ("start", "book", {"id": "bk001", "lang": "en"}, {None: ""}),
    ("start", "author", {}, {None: ""}),
    ("end", "author", "Hightower, Kim", "\n    "),
    ("start", "title", {}, {None: ""}),
    ("end", "title", "The First Book", "\n    "),
    ("start", "genre", {}, {None: ""}),
    ("end", "genre", "Fiction", "\n    "),
    ("start", "price", {}, {None: ""}),
    ("end", "price", "44.95", "\n    "),
    ("start", "pub_date", {}, {None: ""}),
    ("end", "pub_date", "2000-10-01", "\n    "),
    ("start", "review", {}, {None: ""}),
    ("end", "review", "An amazing story of nothing.", "\n  "),
    ("end", "book", "\n    ", "\n  "),
    ("start-ns", None, ""),
    ("start", "book", {"id": "bk002", "lang": "en"}, {None: ""}),
    ("start", "author", {}, {None: ""}),
    ("end", "author", "Nagata, Suanne", "\n    "),
    ("start", "title", {}, {None: ""}),
    ("end", "title", "Becoming Somebody", "\n    "),
    ("start", "genre", {}, {None: ""}),
    ("end", "genre", "Biography", "\n    "),
    ("start", "price", {}, {None: ""}),
    ("end", "price", "33.95", "\n    "),
    ("start", "pub_date", {}, {None: ""}),
    ("end", "pub_date", "2001-01-10", "\n    "),
    ("start", "review", {}, {None: ""}),
    ("end", "review", "A masterpiece of the fine art of gossiping.", "\n  "),
    ("end", "book", "\n    ", "\n"),
    ("end", "{urn:books}books", "\n  ", None),
]