Skip to content

Commit

Permalink
Merge pull request #16 from tmconsulting/develop
Browse files Browse the repository at this point in the history
[1.3.5] update blank as html
  • Loading branch information
roquie authored Aug 23, 2018
2 parents 08e7263 + 353f812 commit f242f6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions onelya_sdk/railway/reservation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ def meal_option(self, order_item_id: int, meal_option_code: str, order_item_blan
order_item_blank_id=order_item_blank_id)
return MealOption(response)

def blank_as_html(self, order_item_id: int):
response = self.request_wrapper.make_request(BLANK_AS_HTML_METHOD, order_item_id=order_item_id)
def blank_as_html(self, order_item_id: int, order_item_ids: 'list of int'=None):
response = self.request_wrapper.make_request(BLANK_AS_HTML_METHOD, order_item_id=order_item_id,
order_item_ids=order_item_ids)
return BlankAsHtml(response)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

__version__ = '1.3.4'
__version__ = '1.3.5'

setup(
version=__version__,
Expand Down
3 changes: 2 additions & 1 deletion tests/data/Railway/Reservation/BlankAsHtml.in.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"OrderItemId": 1
"OrderItemId": 0,
"OrderItemIds": [1]
}
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_reservation_meal_option(self):
@mock.patch('requests.Session', MockHTMLSession)
def test_reservation_blank_as_html(self):
api = API(self.username, self.password, self.pos)
blank_as_html = api.railway_reservation.blank_as_html(1)
blank_as_html = api.railway_reservation.blank_as_html(0, [1])

input_data = json.loads(open('tests/data/Railway/Reservation/BlankAsHtml.in.json', 'r', encoding='utf8').read())
html_file = open(HTML_PATH, 'r').read()
Expand Down

0 comments on commit f242f6d

Please sign in to comment.