'Register a new user using random username.
Verify registration by checking the page title'

def test_that_thank_you_page_is_displayed_after_registration(self, base_url, selenium):

    page = RegisterPage(base_url, selenium).open()
    page.register_new_user()
    registration_text = page.successful_registration_message
    assert ('Thank    you    for    registering!' in registration_text)
    actual_page_title = page.page_title
    expected_page_title = page._page_title_after_registration
    assert (expected_page_title in actual_page_title)
