コード例 #1
0
    def test_add_stand_to_property(self):
        prop1 = ForestProperty(user=self.user, name="My Property", geometry_final=p1)
        prop1.save()

        prop1.add(self.stand1)
        self.assertEqual(self.stand1.collection, prop1)
        self.assertTrue(self.stand1 in prop1.feature_set())

        prop1.remove(self.stand1)
        self.assertEqual(self.stand1.collection, None)
        self.assertTrue(self.stand1 not in prop1.feature_set())
コード例 #2
0
ファイル: unittests.py プロジェクト: d-diaz/forestplanner
    def test_add_stand_to_property(self):
        prop1 = ForestProperty(user=self.user, name="My Property", geometry_final=p1)
        prop1.save()

        prop1.add(self.stand1)
        self.assertEqual(self.stand1.collection, prop1)
        self.assertTrue(self.stand1 in prop1.feature_set())

        prop1.remove(self.stand1)
        self.assertEqual(self.stand1.collection, None)
        self.assertTrue(self.stand1 not in prop1.feature_set())