Example #1
0
    def test_create_container_3(self):
        request = http.HttpRequest()
        request.POST.update({'method': 'CreateContainer',
                                       'name' : 'a' * 100})
        forms = containers.CreateContainer(request.POST)

        self.assertEqual(forms.is_valid(), True)
Example #2
0
 def test_container_acl_1(self):
     request = http.HttpRequest()
     request.POST.update({'method': 'ContainerAcl',
                                    'acl_add' : 'a' * 300})
     forms = containers.ContainerAcl(request.POST)
     self.assertEqual(forms.is_valid(), False)
Example #3
0
 def test_create_container_2(self):
     request = http.HttpRequest()
     request.POST['method'] = 'CreateContainer'
     forms, handled = containers.CreateContainer.maybe_handle(request)
     self.assertEqual(forms.is_valid(), False)
Example #4
0
 def test_delete_container(self):
     request = http.HttpRequest()
     forms, handled = containers.DeleteContainer.maybe_handle(request)
     self.assertEqual(forms.is_valid(), False)
Example #5
0
 def test_container_acl_1(self):
     request = http.HttpRequest()
     request.POST.update({'method': 'ContainerAcl', 'acl_add': 'a' * 300})
     forms = containers.ContainerAcl(request.POST)
     self.assertEqual(forms.is_valid(), False)
Example #6
0
 def test_create_container_7(self):
     request = http.HttpRequest()
     request.POST.update({'method': 'CreateContainer', 'name': 'a' * 300})
     forms = containers.CreateContainer(request.POST)
     self.assertEqual(forms.is_valid(), False)
Example #7
0
 def test_create_container_2(self):
     request = http.HttpRequest()
     request.POST['method'] = 'CreateContainer'
     forms, handled = containers.CreateContainer.maybe_handle(request)
     self.assertEqual(forms.is_valid(), False)
Example #8
0
 def test_delete_container(self):
     request = http.HttpRequest()
     forms, handled = containers.DeleteContainer.maybe_handle(request)
     self.assertEqual(forms.is_valid(), False)