def test_overlaps(self, get_border_geometry): other_domain = MagicMock() d = Domain() d.overlaps(other_domain) d.get_border_geometry.assert_called_once() d.get_border_geometry().Overlaps.assert_called_once_with( other_domain.get_border_geometry())
def test_intersects(self, get_border_geometry): other_domain = MagicMock() d = Domain() d.intersects(other_domain) d.get_border_geometry.assert_called_once() d.get_border_geometry().Intersects.assert_called_once_with( other_domain.get_border_geometry())
def test_get_border_geometry(self): d = Domain(4326, "-te 25 70 35 72 -ts 500 500") geom = d.get_border_geometry() self.assertEqual(type(geom), ogr.Geometry)
def test_overlaps(self, get_border_geometry): other_domain = MagicMock() d = Domain() d.overlaps(other_domain) d.get_border_geometry.assert_called_once() d.get_border_geometry().Overlaps.assert_called_once_with(other_domain.get_border_geometry())
def test_intersects(self, get_border_geometry): other_domain = MagicMock() d = Domain() d.intersects(other_domain) d.get_border_geometry.assert_called_once() d.get_border_geometry().Intersects.assert_called_once_with(other_domain.get_border_geometry())