How to realize the reuse of test cases under Python selenium POM automatic development mode

develop an automated test case of the system in a page-oriented development mode;
the existing login login_case, will develop a logout_case.
because the prerequisite for logout_case is that the user has logged in, you must first call login_case in the code of logout_case.
excuse me, how is the code organized more elegantly?

here is the code:
LoginPage

class Login(Page):
    """
        
    """

    url = "/honycloud/login.jsp"

    login_username_loc = (By.ID, "idToken1")
    login_password_loc = (By.ID, "idToken2")
    login_button_loc = (By.ID, "loginButton_0")

    def login_username(self, username):
        self.find_element(*self.login_username_loc).send_keys(username)

    def login_password(self, password):
        self.find_element(*self.login_password_loc).send_keys(password)

    def login_button(self):
        self.find_element(*self.login_button_loc).click()

    def user_login(self, username="badusername", password="badpassword"):
        self.open()
        self.login_username(username)
        self.login_password(password)
        self.login_button()
        sleep(1)

login_case


class LoginTest(myunit.MyUnitTest):
    """
    
    """

    -sharp test login
    def user_login_verify(self, username="", password=""):
        Login(self.driver).user_login(username, password)

    def test_login(self):
        self.user_login_verify(username="xxxx", password="ffff!")
        page = Login(self.driver)
        title = page.on_title()
        self.assertEqual(title, u"")
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf2ee1-31e23.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf2ee1-31e23.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?