def test_point_default_srid(self): """ Test that asserts that the default srid generated is correct """ point = gen_point() self.assertEqual(point.srid, 4326)
def test_point_different_srid(self): """ Tests that the appointed srid will be used for generating the point """ point = gen_point(srid=4674) # SIRGAS 2000 self.assertEqual(point.srid, 4674)
def test_point_with_z(self): """ Test that makes sure that when z arguments are passed, the generator accounts for them """ point = gen_point(min_z=0, max_z=1) self.assertGreaterEqual(point.z, 0) self.assertLessEqual(point.z, 1)
def test_point_is_within_bounds(self): """ Test that the generator respects the bounds passed on to it. """ point = gen_point(0, 0, 10, 10) self.assertGreaterEqual(point.x, 0) self.assertGreaterEqual(point.y, 0) self.assertLessEqual(point.x, 10) self.assertLessEqual(point.y, 10)
def test_point_is_point(self): point = gen_point() self.assertIsInstance(point, Point)