functional_tests Package¶
functional_tests
Package¶
A separate app containing all functional tests for the project.
models
Module¶
tests
Module¶
Functional tests for Distro Tracker.
-
class
functional_tests.tests.
ChangeProfileTest
(methodName='runTest')[source]¶ Bases:
functional_tests.tests.UserAccountsTestMixin
,functional_tests.tests.SeleniumTestCase
-
test_manage_account_emails
()[source]¶ Tests that the user can manage which email addresses are associated with their account.
-
-
class
functional_tests.tests.
ManageSubscriptionTest
(methodName='runTest')[source]¶ Bases:
functional_tests.tests.UserAccountsTestMixin
,functional_tests.tests.SeleniumTestCase
-
serialized_rollback
= True¶
-
-
class
functional_tests.tests.
PackagePageTest
(methodName='runTest')[source]¶ Bases:
functional_tests.tests.SeleniumTestCase
-
get_package_url
(package_name)[source]¶ Helper method returning the URL of the package with the given name.
-
send_text_to_package_search_form
(text)[source]¶ Helper function to send text input to the package search form.
-
test_access_package_page_from_index
()[source]¶ Tests that the user can access a package page starting from the index and using the provided form.
-
-
class
functional_tests.tests.
RepositoryAdminTest
(methodName='runTest')[source]¶
-
class
functional_tests.tests.
SeleniumTestCase
(methodName='runTest')[source]¶ Bases:
distro_tracker.test.LiveServerTestCase
A class which includes some common functionality for all tests which use Selenium.
-
absolute_url
(relative)[source]¶ Helper method which builds an absolute URL where the live_server_url is the root.
-
assert_current_url_equal
(url)[source]¶ Helper method which asserts that the given URL equals the current browser URL. The given URL should not include the domain.
-
assert_element_with_id_in_page
(element_id, custom_message=None)[source]¶ Helper method which asserts that the element with the given ID can be found in the current browser page.
-
clear_element_text
(tag_id)[source]¶ Helper method which removes any text already found in the element with the given ID.
-
get_page
(relative)[source]¶ Helper method which points the browser to the absolute URL based on the given relative URL and the server’s live_server_url.
-
input_to_element
(tag_id, text)[source]¶ Helper method which sends the text to the element with the given ID.
-
-
class
functional_tests.tests.
SubscribeToPackageTest
(methodName='runTest')[source]¶ Bases:
functional_tests.tests.UserAccountsTestMixin
,functional_tests.tests.SeleniumTestCase
Tests for stories regarding subscribing to a package over the Web.
-
test_package_subscription_no_email_from_subscription_tab_fails
()[source]¶ The UI should prevent the user from forgetting to check at least one email checkbox from the subscription tab in its personnal space.
-
test_package_subscription_no_package_from_subscription_tab_fails
()[source]¶ The UI should prevent the user from forgetting to check at least one email checkbox from the subscription tab in its personnal space.
-
test_subscribe_from_package_page
()[source]¶ Tests that a user that has only one email address can subscribe to a package directly from the package page.
-
test_subscribe_multiple_associated_emails
()[source]¶ Tests that a user with multiple associated email addresses is offered a choice which address to use to subscribe to a package.
-
test_subscribe_not_logged_in
()[source]¶ Tests that when a user is not logged in, the response redirects to the log in page instead of subscribing to the package.
-
-
class
functional_tests.tests.
TeamTests
(methodName='runTest')[source]¶ Bases:
functional_tests.tests.UserAccountsTestMixin
,functional_tests.tests.SeleniumTestCase
-
test_create_team_maintainer_email
()[source]¶ Tests creating a team with a maintainer email set. The team should become automatically associated with the maintainer’s packages.
-
test_owner_team_management
()[source]¶ Tests that a team owner is able to add/remove members from a separate panel.
-
test_package_management
()[source]¶ Tests that adding/removing packages from the team works as expected.
-
-
class
functional_tests.tests.
UserAccountsTestMixin
[source]¶ Bases:
object
Defines some common methods for all user account tests.
-
log_in
(user=None, password=None)[source]¶ Helper method which logs the user in, without taking any shortcuts (it goes through the steps to fill in the form and submit it).
-
-
class
functional_tests.tests.
UserRegistrationTest
(methodName='runTest')[source]¶ Bases:
functional_tests.tests.UserAccountsTestMixin
,functional_tests.tests.SeleniumTestCase
Tests for the user registration story.
-
get_confirmation_url
(message)[source]¶ Extracts the confirmation URL from the given email message. Returns
None
if the message did not contain a confirmation URL.
-
test_logout_from_package_page
()[source]¶ If a user logs out when on the package page, the response should not redirect to the index.
-