Beispiel #1
0
 def test_get_default_json(self):
     ''' Verify json output '''
     try:
         b.get_data(rooms, country, out_format='json')
         if not os.path.isfile('hotels-in-{}.txt'.format(country)):
             raise AssertionError()
     except IOError:
         print('Failure: File cannot be read.')
Beispiel #2
0
 def test_get_default_json(self):
     """ Verify json output """
     try:
         b.get_data(
             rooms,
             country,
             out_format="json",
             start_date=b.default_start_date(),
             end_date=b.default_end_date(),
         )
         assert os.path.isfile("hotels-in-{}.txt".format(country))
     except IOError:
         print("Failure: File cannot be read.")