Beispiel #1
0
 def setUp(self):
     self.p1 = Point(-7615441.0, 5953519.0)
     self.instance = make_instance(point=self.p1)
     self.commander_user = make_commander_user(self.instance)
     self.direct_user = make_officer_user(self.instance)
     self.pending_user = make_apprentice_user(self.instance)
     self.observer_user = make_observer_user(self.instance)
     self.outlaw_user = make_user_with_default_role(self.instance, 'outlaw')
     self.tweaker_user = make_tweaker_user(self.instance)
     self.conjurer_user = make_conjurer_user(self.instance)
 def setUp(self):
     self.p1 = Point(-7615441.0, 5953519.0)
     self.instance = make_instance(point=self.p1)
     self.commander_user = make_commander_user(self.instance)
     self.direct_user = make_officer_user(self.instance)
     self.pending_user = make_apprentice_user(self.instance)
     self.observer_user = make_observer_user(self.instance)
     self.outlaw_user = make_user_with_default_role(self.instance, 'outlaw')
     self.tweaker_user = make_tweaker_user(self.instance)
     self.conjurer_user = make_conjurer_user(self.instance)
Beispiel #3
0
    def setUp(self):
        instance = make_instance()
        # Fancy name, but no write, create, or delete permissions
        instance.default_role.name = Role.ADMINISTRATOR

        self.creator_user = make_officer_user(instance)
        self.admin_user = make_admin_user(instance)
        self.other_user = make_observer_user(instance, username='******')
        self.tweaker_user = make_tweaker_user(instance)
        self.conjurer_user = make_conjurer_user(instance)

        self.plot = Plot(geom=instance.center, instance=instance)
        self.plot.save_with_user(self.creator_user)

        self.tree = Tree(plot=self.plot, instance=instance)
        self.tree.save_with_user(self.creator_user)

        self.rainBarrel = RainBarrel(geom=instance.center, instance=instance,
                                     capacity=5)
        self.rainBarrel.save_with_user(self.creator_user)
    def setUp(self):
        instance = make_instance()
        # Fancy name, but no write, create, or delete permissions
        instance.default_role.name = Role.ADMINISTRATOR

        self.creator_user = make_officer_user(instance)
        self.admin_user = make_admin_user(instance)
        self.other_user = make_observer_user(instance, username='******')
        self.tweaker_user = make_tweaker_user(instance)
        self.conjurer_user = make_conjurer_user(instance)

        self.plot = Plot(geom=instance.center, instance=instance)
        self.plot.save_with_user(self.creator_user)

        self.tree = Tree(plot=self.plot, instance=instance)
        self.tree.save_with_user(self.creator_user)

        self.rainBarrel = RainBarrel(geom=instance.center, instance=instance,
                                     capacity=5)
        self.rainBarrel.save_with_user(self.creator_user)
 def test_works_with_user_with_no_create_perms(self):
     user = make_tweaker_user(self.instance)
     self.assertEqual(
         self._render_basic_template_with_vars(user, self.plot), '')