Example #1
0
 def test_stop_method_with_xml_format(self):
     b = Bongo('xml')
     b.stop(8350)
     self.get.return_value = Mock()
     params = {'format': 'xml', 'stopid': 8350}
     endpoint = 'http://ebongo.org/api/stop'
     self.get.assert_called_with(endpoint, params=params)
Example #2
0
 def test_stop_method_can_take_int_argument(self):
     b = Bongo()
     b.stop(12345)
     params = {'format': 'json', 'stopid': 12345}
     endpoint = 'http://ebongo.org/api/stop'
     self.get.assert_called_with(endpoint, params=params)
Example #3
0
 def test_specific_stop(self):
     b = Bongo()
     b.stop('12345')
     params = {'format': 'json', 'stopid': '12345'}
     endpoint = 'http://ebongo.org/api/stop'
     self.get.assert_called_with(endpoint, params=params)
Example #4
0
 def test_empty_stop_method(self):
     b = Bongo()
     b.stop()
     params = {'format': 'json'}
     endpoint = 'http://ebongo.org/api/stoplist'
     self.get.assert_called_with(endpoint, params=params)