示例#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)
示例#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)
示例#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)
示例#4
0
 def test_delete_container(self):
     request = http.HttpRequest()
     forms, handled = containers.DeleteContainer.maybe_handle(request)
     self.assertEqual(forms.is_valid(), False)
示例#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)
示例#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)
示例#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)
示例#8
0
 def test_delete_container(self):
     request = http.HttpRequest()
     forms, handled = containers.DeleteContainer.maybe_handle(request)
     self.assertEqual(forms.is_valid(), False)