Esempio n. 1
0
 def test_big_landsat_search(self):
     """ Search for a bunch of Landsat data """
     search = Query(date='2017-01-01', satellite_name='Landsat-8')
     self.assertEqual(search.found(), 564)
     scenes = search.scenes()
     self.assertEqual(len(scenes), 564)
     # verify this is 564 unique scenes
     ids = set([s.scene_id for s in scenes])
     self.assertEqual(len(ids), 564)
Esempio n. 2
0
 def test_big_sentinel_search(self):
     """ Search for a bunch of Sentinel data """
     search = Query(**{
         'datetime': '2017-01-01',
         'eo:platform': 'sentinel-2a'
     })
     self.assertEqual(search.found(), self.num_sentinel)
     scenes = search.items()
     self.assertEqual(len(scenes), self.num_sentinel)
Esempio n. 3
0
    def test_big_landsat_search(self):
        """ Search for a bunch of Landsat data """
        search = Query(**{
            'datetime': '2017-01-01',
            'eo:platform': 'landsat-8'
        })
        self.assertEqual(search.found(), self.num_landsat)

        scenes = search.items()

        self.assertEqual(len(scenes), self.num_landsat)
Esempio n. 4
0
 def test_big_sentinel_search(self):
     """ Search for a bunch of Sentinel data """
     search = Query(date='2017-01-01', satellite_name='Sentinel-2A')
     self.assertEqual(search.found(), self.num_sentinel)
     scenes = search.scenes()
     self.assertEqual(len(scenes), self.num_sentinel)
Esempio n. 5
0
 def test_big_landsat_search(self):
     """ Search for a bunch of Landsat data """
     search = Query(date='2017-01-01', satellite_name='Landsat-8')
     self.assertEqual(search.found(), self.num_landsat)
     scenes = search.scenes()
     self.assertEqual(len(scenes), self.num_landsat)
Esempio n. 6
0
 def test_bad_search(self):
     """ Run a bad query """
     q = Query(limit='a')
     with self.assertRaises(SatSearchError):
         q.found()
Esempio n. 7
0
 def test_empty_search(self):
     """ Perform search for 0 results """
     search = Query(scene_id='nosuchscene')
     self.assertEqual(search.found(), 0)
Esempio n. 8
0
 def test_hits(self):
     """ Check total number of results """
     search = Query(date='2017-01-01')
     hits = search.found()
     self.assertEqual(hits, 4267)
Esempio n. 9
0
 def test_bad_search(self):
     """ Run a bad query """
     q = Query(limit='a')
     q.found()