Exemple #1
0
    def test_create_container_post(self):
        formData = {'name': 'containerName', 'method': 'CreateContainer'}

        self.mox.StubOutWithMock(api, 'chase_create_container')
        api.chase_create_container(IsA(http.HttpRequest), u'containerName')

        self.mox.ReplayAll()

        res = self.client.post(reverse('steer:engine:containers:create'),
                               formData)

        self.assertRedirectsNoFollow(res, CONTAINER_INDEX_URL)
Exemple #2
0
    def test_create_container_post(self):
        formData = {'name': 'containerName',
                    'method': 'CreateContainer'}

        self.mox.StubOutWithMock(api, 'chase_create_container')
        api.chase_create_container(
                IsA(http.HttpRequest), u'containerName')

        self.mox.ReplayAll()

        res = self.client.post(reverse('steer:engine:containers:create'),
                               formData)

        self.assertRedirectsNoFollow(res, CONTAINER_INDEX_URL)
Exemple #3
0
 def handle(self, request, data):
     api.chase_create_container(request, data['name'])
     messages.success(request, _("Container was successfully created."))
     return shortcuts.redirect("steer:engine:containers:index")
Exemple #4
0
 def handle(self, request, data):
     api.chase_create_container(request, data['name'])
     messages.success(request, _("Container was successfully created."))
     return shortcuts.redirect("steer:engine:containers:index")