Пример #1
0
    def test_remove_geo_resources(self):
        """Removing resources should get rid of only the "geo" resources"""
        # Create a layer
        l = Layer(self._test_package["id"], self._test_resource["id"], "testing-layer", self.admin_user().name)

        # Add resources
        l.create_geo_resources()

        # Remove resources
        l.remove_geo_resources()

        # Check what's left
        p = toolkit.get_action("package_show")(None, {"id": self._test_package_name})
        self.assertEqual(len(p["resources"]), 1)
Пример #2
0
    def test_remove_geo_resources(self):
        """Removing resources should get rid of only the "geo" resources"""
        # Create a layer
        l = Layer(self._test_package["id"], self._test_resource["id"], "testing-layer", self.admin_user().name)

        # Add resources
        l.create_geo_resources()

        # Remove resources
        l.remove_geo_resources()

        # Check what's left
        p = toolkit.get_action("package_show")(None, {"id": self._test_package_name})
        self.assertEqual(len(p["resources"]), 1)
Пример #3
0
 def test_create_geo_resources(self):
     """Creating WFS/WMS resources should return two resources"""
     l = Layer(self._test_package["id"], self._test_resource["id"],
               "testing-layer",
               self.admin_user().name)
     self.assertEqual(len(l.create_geo_resources()), 2)
Пример #4
0
 def test_create_geo_resources(self):
     """Creating WFS/WMS resources should return two resources"""
     l = Layer(self._test_package["id"], self._test_resource["id"], "testing-layer", self.admin_user().name)
     self.assertEqual(len(l.create_geo_resources()), 2)