class TestFormAction(UnitTestCase):
    def setUp(self):
        super(TestFormAction, self).setUp()
        self.paginator = SlidingPkPaginator([], anchor=1)

    def test_default_action_is_current_page(self):
        self.assert_equals(".", self.paginator.form_action)

    def test_paginator_with_reverse_lookup(self):
        self.paginator.view_name = "myapp-objects"
        self.assert_equals("/1/10/", unquote_plus(self.paginator.form_action))

    def test_post_parsing_anchor(self):
        self.paginator.parse_post({
                'anchor' : 1,
            }
        )
        self.assert_equals(1, self.paginator.anchor)