コード例 #1
0
 def setUp(self):
     self.gargoyle = SwitchManager(Switch,
                                   key='key',
                                   value='value',
                                   instances=True,
                                   auto_create=True)
     self.gargoyle.register(HostConditionSet())
コード例 #2
0
 def setUp(self):
     self.user = User.objects.create(username='******',
                                     email='*****@*****.**')
     self.gargoyle = SwitchManager(Switch,
                                   key='key',
                                   value='value',
                                   instances=True)
     self.gargoyle.register(UserConditionSet(User))
コード例 #3
0
    def setUp(self):
        super(NumberConditionSetTests, self).setUp()
        self.gargoyle = SwitchManager(Switch,
                                      key='key',
                                      value='value',
                                      instances=True,
                                      auto_create=True)
        self.gargoyle.register(NumberConditionSet())

        Switch.objects.create(key='test', status=SELECTIVE)
        self.switch = self.gargoyle['test']
コード例 #4
0
 def setUp(self):
     self.user = User.objects.create(username='******',
                                     email='*****@*****.**')
     self.gargoyle = SwitchManager(Switch,
                                   key='key',
                                   value='value',
                                   instances=True,
                                   auto_create=True)
     self.gargoyle.register(UserConditionSet(User))
     self.gargoyle.register(IPAddressConditionSet())
     self.internal_ips = settings.INTERNAL_IPS
コード例 #5
0
    def setUp(self):
        super(IPAddressConditionSetTests, self).setUp()
        self.gargoyle = SwitchManager(Switch,
                                      key='key',
                                      value='value',
                                      instances=True,
                                      auto_create=True)
        self.gargoyle.register(IPAddressConditionSet())
        self.request_factory = RequestFactory()

        Switch.objects.create(key='test', status=SELECTIVE)
        self.switch = self.gargoyle['test']
        assert not self.gargoyle.is_active('test')
コード例 #6
0
 def setUp(self):
     self.gargoyle = SwitchManager(Switch,
                                   key='key',
                                   value='value',
                                   instances=True,
                                   auto_create=True)