Exemplo n.º 1
0
 def test_url_for_last(self):
     api = ThingSpeakApi(
         key='ABCDEFGHIJ1234567890',
         channel=700,
         base_url='https://api.example.com:6666'
     )
     assert (api._get_url('last') ==
             'https://api.example.com:6666/channels/700/feed/last.json')
Exemplo n.º 2
0
 def test_url_for_update(self):
     api = ThingSpeakApi(
         key='ABCDEFGHIJ1234567890',
         channel=700,
         base_url='https://api.example.com:6666'
     )
     assert (api._get_url('update') ==
             'https://api.example.com:6666/update.json')