Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #9
0
 def test_invalid_form(self):
     form = HookForm(data={})
     self.assertFalse(form.is_valid())
Beispiel #10
0
 def test_invalid_form(self):
     form = HookForm(data={})
     self.assertFalse(form.is_valid())