Exemplo n.º 1
0
    def _test_get(self):
        """ Test real query """

        query = GranuleQuery()
        query.short_name('MCD43A4').version('005')
        query.temporal(datetime(2016, 1, 1), datetime(2016, 1, 1))
        results = query.get(limit=10)

        self.assertEqual(len(results), 10)
Exemplo n.º 2
0
    def _test_hits(self):
        """ integration test for hits() """

        query = GranuleQuery()
        query.short_name("AST_L1T").version("003").temporal(
            "2016-10-26T01:30:00Z", "2016-10-26T01:40:00Z")
        hits = query.hits()

        self.assertEqual(hits, 3)
Exemplo n.º 3
0
    def test_short_name(self):
        query = GranuleQuery()
        query.short_name(self.short_name_val)

        self.assertIn(self.short_name, query.params)
        self.assertEqual(query.params[self.short_name], self.short_name_val)