|
@@ -2,12 +2,13 @@
|
|
|
|
|
|
import pytest
|
|
import pytest
|
|
|
|
|
|
|
|
+import datetime
|
|
|
|
+import difflib
|
|
|
|
+import dingguo
|
|
|
|
+import ioex.datetimeex
|
|
import os
|
|
import os
|
|
import pytz
|
|
import pytz
|
|
import yaml
|
|
import yaml
|
|
-import dingguo
|
|
|
|
-import difflib
|
|
|
|
-import datetime
|
|
|
|
|
|
|
|
def get_figure_a():
|
|
def get_figure_a():
|
|
return dingguo.Figure(12.3, u'km')
|
|
return dingguo.Figure(12.3, u'km')
|
|
@@ -101,6 +102,10 @@ def get_transportation():
|
|
valid_from = datetime.datetime(2016, 7, 14, 13, 50, 4, 0, tzinfo = pytz.timezone('Europe/Vienna')),
|
|
valid_from = datetime.datetime(2016, 7, 14, 13, 50, 4, 0, tzinfo = pytz.timezone('Europe/Vienna')),
|
|
valid_until = datetime.datetime(2016, 7, 14, 18, 50, 4, 0, tzinfo = pytz.utc),
|
|
valid_until = datetime.datetime(2016, 7, 14, 18, 50, 4, 0, tzinfo = pytz.utc),
|
|
ticket_url = u'https://www.example.com',
|
|
ticket_url = u'https://www.example.com',
|
|
|
|
+ estimated_arrival_time = ioex.datetimeex.Period(
|
|
|
|
+ start = pytz.timezone('Europe/Vienna').localize(datetime.datetime(2016, 7, 24, 23, 47, 2)),
|
|
|
|
+ end = pytz.utc.localize(datetime.datetime(2016, 7, 24, 23, 48, 5)),
|
|
|
|
+ ),
|
|
)
|
|
)
|
|
|
|
|
|
def get_shipping():
|
|
def get_shipping():
|
|
@@ -242,7 +247,7 @@ items:
|
|
- !item
|
|
- !item
|
|
name: item β
|
|
name: item β
|
|
price_brutto: !sum '20.45 EUR'
|
|
price_brutto: !sum '20.45 EUR'
|
|
-order_date: 2016-05-08
|
|
+order_date: 2016-05-08 00:18:17
|
|
order_id: id
|
|
order_id: id
|
|
platform: platformπ
|
|
platform: platformπ
|
|
"""],
|
|
"""],
|
|
@@ -268,6 +273,9 @@ width: !scalar '1.23 m'
|
|
departure_point: home
|
|
departure_point: home
|
|
destination_point: city
|
|
destination_point: city
|
|
distance: !distance '3.21 km'
|
|
distance: !distance '3.21 km'
|
|
|
|
+estimated_arrival_time: !period
|
|
|
|
+ end: 2016-07-24 23:48:05+00:00
|
|
|
|
+ start: 2016-07-24 23:47:02+02:00
|
|
name: ticket
|
|
name: ticket
|
|
passenger: !person
|
|
passenger: !person
|
|
first_name: Fabian Peter
|
|
first_name: Fabian Peter
|
|
@@ -297,13 +305,13 @@ platformπ:
|
|
customer_id: customer
|
|
customer_id: customer
|
|
discounts: []
|
|
discounts: []
|
|
items: []
|
|
items: []
|
|
- order_date: 2016-05-08
|
|
+ order_date: 2016-05-08 00:18:17
|
|
order_id: id
|
|
order_id: id
|
|
platform: platformπ
|
|
platform: platformπ
|
|
order_b: !order
|
|
order_b: !order
|
|
discounts: []
|
|
discounts: []
|
|
items: []
|
|
items: []
|
|
- order_date: 2015-05-08
|
|
+ order_date: 2015-05-08 00:18:17
|
|
order_id: order_b
|
|
order_id: order_b
|
|
platform: platformπ
|
|
platform: platformπ
|
|
γάμμα:
|
|
γάμμα:
|
|
@@ -311,7 +319,7 @@ platformπ:
|
|
customer_id: ρώ
|
|
customer_id: ρώ
|
|
discounts: []
|
|
discounts: []
|
|
items: []
|
|
items: []
|
|
- order_date: 2014-05-08
|
|
+ order_date: 2014-05-08 00:18:17
|
|
order_id: order_βήτα
|
|
order_id: order_βήτα
|
|
platform: γάμμα
|
|
platform: γάμμα
|
|
"""],
|
|
"""],
|
|
@@ -389,6 +397,9 @@ passenger: !person
|
|
ticket_url: https://www.example.com
|
|
ticket_url: https://www.example.com
|
|
valid_from: 2016-07-14 13:50:04+01:05
|
|
valid_from: 2016-07-14 13:50:04+01:05
|
|
valid_until: 2016-07-14 18:50:04+00:00
|
|
valid_until: 2016-07-14 18:50:04+00:00
|
|
|
|
+estimated_arrival_time: !period
|
|
|
|
+ end: 2016-07-24T23:48:05+00:00
|
|
|
|
+ start: 2016-07-24T23:47:02+02:00
|
|
"""],
|
|
"""],
|
|
[get_shipping(), u"""!shipping
|
|
[get_shipping(), u"""!shipping
|
|
destination_point: home
|
|
destination_point: home
|
|
@@ -416,7 +427,7 @@ items:
|
|
- !item
|
|
- !item
|
|
name: item β
|
|
name: item β
|
|
price_brutto: !sum '20.45 EUR'
|
|
price_brutto: !sum '20.45 EUR'
|
|
-order_date: 2016-05-08
|
|
+order_date: 2016-05-08 00:18:17
|
|
order_id: id
|
|
order_id: id
|
|
platform: platformπ
|
|
platform: platformπ
|
|
""")
|
|
""")
|
|
@@ -463,13 +474,13 @@ platformπ:
|
|
id: !order
|
|
id: !order
|
|
customer_id: customer
|
|
customer_id: customer
|
|
discounts: []
|
|
discounts: []
|
|
- order_date: 2016-05-08
|
|
+ order_date: 2016-05-08 00:18:17
|
|
order_id: id
|
|
order_id: id
|
|
platform: platformπ
|
|
platform: platformπ
|
|
order_b: !order
|
|
order_b: !order
|
|
customer_id: null
|
|
customer_id: null
|
|
items: []
|
|
items: []
|
|
- order_date: 2015-05-08
|
|
+ order_date: 2015-05-08 00:18:17
|
|
order_id: order_b
|
|
order_id: order_b
|
|
platform: platformπ
|
|
platform: platformπ
|
|
γάμμα:
|
|
γάμμα:
|
|
@@ -477,7 +488,7 @@ platformπ:
|
|
customer_id: ρώ
|
|
customer_id: ρώ
|
|
discounts: []
|
|
discounts: []
|
|
items: []
|
|
items: []
|
|
- order_date: 2014-05-08
|
|
+ order_date: 2014-05-08 00:18:17
|
|
order_id: order_βήτα
|
|
order_id: order_βήτα
|
|
platform: γάμμα
|
|
platform: γάμμα
|
|
""")
|
|
""")
|