コード例 #1
0
ファイル: test_form.py プロジェクト: johnjohnsp1/w3af
    def test_variants_dont_modify_original(self):
        bigform_data = form_with_radio + form_select_misc
        form = create_form_helper(bigform_data)
        orig_items = form.items()

        # Generate the variants
        variants = [v for v in form.get_variants(mode="tmb")]

        self.assertEqual(orig_items, form.items())
コード例 #2
0
ファイル: test_form.py プロジェクト: 3rdDegree/w3af
    def test_variants_dont_modify_original(self):
        bigform_data = form_with_radio + form_select_misc
        form = create_form_helper(bigform_data)
        orig_items = form.items()

        # Generate the variants
        variants = [v for v in form.get_variants(mode="tmb")]

        self.assertEqual(orig_items, form.items())
コード例 #3
0
ファイル: test_form.py プロジェクト: johnjohnsp1/w3af
    def test_form_copy(self):
        form = create_form_helper(form_with_radio + form_with_checkbox)
        copy = form.copy()

        self.assertEqual(form.items(), copy.items())
        self.assertEqual(form._method, copy._method)
        self.assertEqual(form._action, copy._action)
        self.assertEqual(form._types, copy._types)
        self.assertEqual(form._files, copy._files)
        self.assertEqual(form._selects, copy._selects)
        self.assertEqual(form._submit_map, copy._submit_map)

        self.assertIsNot(form, copy)
コード例 #4
0
ファイル: test_form.py プロジェクト: 3rdDegree/w3af
    def test_form_copy(self):
        form = create_form_helper(form_with_radio + form_with_checkbox)
        copy = form.copy()

        self.assertEqual(form.items(), copy.items())
        self.assertEqual(form._method, copy._method)
        self.assertEqual(form._action, copy._action)
        self.assertEqual(form._types, copy._types)
        self.assertEqual(form._files, copy._files)
        self.assertEqual(form._selects, copy._selects)
        self.assertEqual(form._submit_map, copy._submit_map)

        self.assertIsNot(form, copy)