Esempio n. 1
0
 def test_get_kml(self):
     species = SpeciesFactory.create(radius=5)
     sensitive_area = SensitiveAreaFactory.create(species=species)
     self.assertIn(
         '<coordinates>3.0,46.5,5.0 3.0,46.500027,5.0 3.0000391,46.500027,5.0 '
         '3.0000391,46.5,5.0 3.0,46.5,5.0</coordinates>',
         sensitive_area.kml())
Esempio n. 2
0
 def get_good_data(self):
     return {
         'species': SpeciesFactory.create().pk,
         'geom':
         '{"type": "Polygon", "coordinates":[[[0, 0], [0, 1], [1, 0], [0, 0]]]}',
         'structure': str(self.user.profile.structure.pk),
     }
Esempio n. 3
0
 def test_specific_radius(self):
     specie = SpeciesFactory.create(radius=50)
     sensitive_area = SensitiveAreaFactory.create(species=specie)
     self.assertEqual(sensitive_area.radius, 50)
Esempio n. 4
0
 def test_specific_radius(self):
     specie = SpeciesFactory.create(radius=50)
     sensitive_area = SensitiveAreaFactory.create(species=specie)
     self.assertEqual(sensitive_area.radius, 50)
Esempio n. 5
0
 def test_get_kml(self):
     species = SpeciesFactory.create(radius=5)
     sensitive_area = SensitiveAreaFactory.create(species=species)
     self.assertIn('<coordinates>3.0,46.5,5.0 3.0,46.5000270135,5.0 3.00003911867,46.5000270135,5.0 3.00003911866,'
                   '46.5,5.0 3.0,46.5,5.0</coordinates>', sensitive_area.kml())
Esempio n. 6
0
 def get_good_data(self):
     return {
         'species': SpeciesFactory.create().pk,
         'structure': default_structure().pk,
         'geom': '{"type": "Polygon", "coordinates":[[[0, 0], [0, 1], [1, 0], [0, 0]]]}',
     }
Esempio n. 7
0
 def get_good_data(self):
     return {
         'species': SpeciesFactory.create().pk,
         'geom': '{"type": "Polygon", "coordinates":[[[0, 0], [0, 1], [1, 0], [0, 0]]]}',
         'structure': str(self.user.profile.structure.pk),
     }