~verterok/unity-scope-googlenews/fix-metadata-published-key

« back to all changes in this revision

Viewing changes to tests/test_googlenews.py

  • Committer: Tarmac
  • Author(s): James Henstridge
  • Date: 2013-03-19 09:21:20 UTC
  • mfrom: (52.2.4 unity-scope-googlnews)
  • Revision ID: tarmac-20130319092120-kiinj9sb5s9t8a25
Test suite fixes: remove the LOC global variable, and don't hit the network for the location check.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
    def test_valid_searches(self):
42
42
        self.scope_module.SEARCH_URI = 'file:tests/data/mock_googlenews_pass.rss#'
 
43
        self.scope_module.GEOIPLOOKUP_URI = 'file:tests/data/mock_geoiplookup.js'
43
44
        expected_results = ["Chorale et sucre d'orge dans le train à Versailles - Le Parisien (Abonnement)"]
44
45
        results = []
45
46
        for s in ['query']:
50
51
 
51
52
    def test_failing_search(self):
52
53
        self.scope_module.SEARCH_URI = 'file:tests/data/mock_googlenews_fail'
 
54
        self.scope_module.GEOIPLOOKUP_URI = 'file:tests/data/mock_geoiplookup.js'
53
55
        for s in ['query']:
54
56
            result_set = self.perform_query(s)
55
57
            self.assertEqual(len(result_set.results), 0)