<s> import unittest <EOL> import requests <EOL> class TestBookingService ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . url = "<STR_LIT>" <EOL> def test_booking_records ( self ) : <EOL> """<STR_LIT>""" <EOL> for date , expected in GOOD_RESPONSES . iteritems ( ) : <EOL> reply = requests . get ( "<STR_LIT>" . format ( self . url , date ) ) <EOL> actual_reply = reply . json ( ) <EOL> self . assertEqual ( len ( actual_reply ) , len ( expected ) , <EOL> "<STR_LIT>" . format ( <EOL> len ( actual_reply ) , len ( expected ) <EOL> ) ) <EOL> self . assertEqual ( set ( actual_reply ) , set ( expected ) , <EOL> "<STR_LIT>" . format ( <EOL> actual_reply , expected ) ) <EOL> def test_not_found ( self ) : <EOL> """<STR_LIT>""" <EOL> invalid_user = "<STR_LIT>" <EOL> actual_reply = requests . get ( "<STR_LIT>" . format ( self . url , invalid_user ) ) <EOL> self . assertEqual ( actual_reply . status_code , <NUM_LIT> , <EOL> "<STR_LIT>" . format ( <EOL> actual_reply . status_code ) ) <EOL> GOOD_RESPONSES = { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : [ <EOL> "<STR_LIT>" <EOL> ] <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : [ <EOL> "<STR_LIT>" <EOL> ] , <EOL> "<STR_LIT>" : [ <EOL> "<STR_LIT>" <EOL> ] <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] , <EOL> "<STR_LIT>" : [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> } <EOL> } <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
