Пример #1
0
    def test_logout_class(self):
        # If browserid-logout isn't in the link_class argument, it should be
        # appended to it prior to calling browserid_button.
        button = browserid_logout(link_class='go button')
        a = pq(button)('a')

        self.assertTrue(a.hasClass('browserid-logout'))
Пример #2
0
 def test_next(self):
     button = helpers.browserid_logout(next='/foo/bar')
     self.assertHTMLEqual(button, """
         <a href="/browserid/logout/" class="browserid-logout" data-next="/foo/bar">
             <span>Sign out</span>
         </a>
     """)
Пример #3
0
    def test_logout_class(self):
        # If browserid-logout isn't in the link_class argument, it should be
        # appended to it prior to calling browserid_button.
        button = browserid_logout(link_class='go button')
        a = pq(button)('a')

        self.assertTrue(a.hasClass('browserid-logout'))
Пример #4
0
 def test_logout_class(self):
     button = helpers.browserid_logout(link_class='go button')
     self.assertHTMLEqual(button, """
         <a href="/browserid/logout/" class="go button browserid-logout" data-next="">
             <span>Sign out</span>
         </a>
     """)
Пример #5
0
 def test_next(self):
     button = helpers.browserid_logout(next='/foo/bar')
     self.assertHTMLEqual(
         button, """
         <a href="/browserid/logout/" class="browserid-logout" data-next="/foo/bar">
             <span>Sign out</span>
         </a>
     """)
Пример #6
0
 def test_logout_class(self):
     with self.settings(LOGOUT_REDIRECT_URL='/'):
         button = helpers.browserid_logout(link_class='go button')
     self.assertHTMLEqual(button, """
         <a href="/browserid/logout/" class="go button browserid-logout" data-next="/">
             <span>Sign out</span>
         </a>
     """)
Пример #7
0
 def test_logout_class(self):
     button = helpers.browserid_logout(link_class='go button')
     self.assertHTMLEqual(
         button, """
         <a href="/browserid/logout/" class="go button browserid-logout" data-next="">
             <span>Sign out</span>
         </a>
     """)
Пример #8
0
 def test_logout_class(self):
     with self.settings(LOGOUT_REDIRECT_URL='/'):
         button = helpers.browserid_logout(link_class='go button')
     self.assertHTMLEqual(
         button, """
         <a href="/browserid/logout/" class="go button" data-next="/">
             <span>Sign out</span>
         </a>
     """)
Пример #9
0
 def test_next_default(self):
     """next should default to LOGOUT_REDIRECT_URL"""
     with self.settings(LOGOUT_REDIRECT_URL='/foo/bar'):
         button = helpers.browserid_logout()
     self.assertHTMLEqual(button, """
         <a href="/browserid/logout/" class="browserid-logout" data-next="/foo/bar">
             <span>Sign out</span>
         </a>
     """)
Пример #10
0
 def test_next_default(self):
     """next should default to LOGOUT_REDIRECT_URL"""
     with self.settings(LOGOUT_REDIRECT_URL='/foo/bar'):
         button = helpers.browserid_logout()
     self.assertHTMLEqual(
         button, """
         <a href="/browserid/logout/" class="browserid-logout" data-next="/foo/bar">
             <span>Sign out</span>
         </a>
     """)
Пример #11
0
 def test_logout_class(self):
     # If browserid-logout isn't in the link_class argument, it should be
     # appended to it prior to calling browserid_button.
     with self.settings(LOGOUT_REDIRECT_URL='/'):
         button = helpers.browserid_logout(link_class='go button')
     self.assertHTMLEqual(button, """
         <a href="/browserid/logout/" class="go button browserid-logout" data-next="/">
             <span>Sign out</span>
         </a>
     """)
Пример #12
0
 def test_logout_class(self):
     # If browserid-logout isn't in the link_class argument, it should be
     # appended to it prior to calling browserid_button.
     with self.settings(LOGOUT_REDIRECT_URL='/'):
         button = helpers.browserid_logout(link_class='go button')
     self.assertHTMLEqual(
         button, """
         <a href="/browserid/logout/" class="go button browserid-logout" data-next="/">
             <span>Sign out</span>
         </a>
     """)
Пример #13
0
def browserid_logout(**kwargs):
    return helpers.browserid_logout(**kwargs)
Пример #14
0
def browserid_logout(context, **kwargs):
    return helpers.browserid_logout(**kwargs)