~ralsina/ubuntu-rest-scopes/add-missing-lat-long

« back to all changes in this revision

Viewing changes to src/scopes/tests/test_weatherchannel.py

  • Committer: Tarmac
  • Author(s): Roberto Alsina
  • Date: 2016-03-07 16:14:14 UTC
  • mfrom: (506.1.2 short-digits-vulgarian)
  • Revision ID: tarmac-20160307161414-5d01c52l2rpkg77p
[r=roadmr] Limit lat/long to 2 decimals in search_location to avoid TWC API error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
762
762
        mock.return_value = get_fixture('weatherchannel-loc_key.json')
763
763
        twci = weatherchannel.TWCInterface(mock, 'foo', FAKE_AUTH, 'en_GB', 'desktop')
764
764
        twci.get_location(1.0, 1.0)
765
 
        loc_uri = ('https://api.weather.com/v2/location?geocode=1.0,1.0'
 
765
        loc_uri = ('https://api.weather.com/v2/location?geocode=1.00,1.00'
766
766
                   '&language=en-GB&format=json&apiKey=bar')
767
767
        mock.assert_called_with(loc_uri)
768
768