Exemplo n.º 1
0
    def test_valid_form(self):

        form_data = {
            'target': "http://example.com",
            'event': HookForm.ADMIN_EVENTS[0][0]
        }
        form = HookForm(data=form_data)
        self.assertTrue(form.is_valid())
Exemplo n.º 2
0
    def test_valid_form(self):

        form_data = {
            'target': "http://example.com",
            'event': HookForm.ADMIN_EVENTS[0][0]
        }
        form = HookForm(data=form_data)
        self.assertTrue(form.is_valid())
Exemplo n.º 3
0
    def test_valid_form(self):

        form_data = {
            'user': self.user.id,
            'target': "http://example.com",
            'event': HookForm.get_admin_events()[0][0]
        }
        form = HookForm(data=form_data)
        self.assertTrue(form.is_valid())
Exemplo n.º 4
0
    def test_valid_form(self):

        form_data = {
            'user': self.user.id,
            'target': "http://example.com",
            'event': HookForm.get_admin_events()[0][0]
        }
        form = HookForm(data=form_data)
        self.assertTrue(form.is_valid())
Exemplo n.º 5
0
    def test_form_save(self):
        form_data = {
            'target': "http://example.com",
            'event': HookForm.ADMIN_EVENTS[0][0]
        }
        form = HookForm(data=form_data)

        self.assertTrue(form.is_valid())
        instance = form.save()
        self.assertIsInstance(instance, Hook)
Exemplo n.º 6
0
    def test_form_save(self):
        form_data = {
            'target': "http://example.com",
            'event': HookForm.ADMIN_EVENTS[0][0]
        }
        form = HookForm(data=form_data)

        self.assertTrue(form.is_valid())
        instance = form.save()
        self.assertIsInstance(instance, Hook)
Exemplo n.º 7
0
    def test_form_save(self):
        form_data = {
            'user': self.user.id,
            'target': "http://example.com",
            'event': HookForm.get_admin_events()[0][0]
        }
        form = HookForm(data=form_data)

        self.assertTrue(form.is_valid())
        instance = form.save()
        self.assertIsInstance(instance, Hook)
Exemplo n.º 8
0
    def test_form_save(self):
        form_data = {
            'user': self.user.id,
            'target': "http://example.com",
            'event': HookForm.get_admin_events()[0][0]
        }
        form = HookForm(data=form_data)

        self.assertTrue(form.is_valid())
        instance = form.save()
        self.assertIsInstance(instance, Hook)
Exemplo n.º 9
0
 def test_invalid_form(self):
     form = HookForm(data={})
     self.assertFalse(form.is_valid())
Exemplo n.º 10
0
 def test_invalid_form(self):
     form = HookForm(data={})
     self.assertFalse(form.is_valid())