pages.accounts.admin package

Submodules

pages.accounts.admin.base module

Base class for the Accounts administrator console.

class pages.accounts.admin.base.AccountsAdmin(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pypom.page.Page

Accounts admin console base.

URL_TEMPLATE = '/admin'
close_tab()[source]

Close the current tab and switch to the remaining one.

Assumes 2 browser tabs are open.

is_displayed()[source]

Return True when the console is loaded.

property loaded

Return True when the console is loaded and the nav is displayed.

property nav

Access the admin console navigation menu.

pages.accounts.admin.console module

Accounts admin controls and console.

class pages.accounts.admin.console.Console(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

Accounts admin controls.

URL_TEMPLATE = '/console'

pages.accounts.admin.contracts module

The Accounts security log.

class pages.accounts.admin.contracts.Contracts(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

The Accounts legal contracts and policies.

URL_TEMPLATE = '/fine_print/contracts'

pages.accounts.admin.security module

The Accounts security log.

class pages.accounts.admin.security.Doorkeeper(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

The OAuth application list.

URL_TEMPLATE = '/oauth/applications'
class pages.accounts.admin.security.Security(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

The Accounts security log entries page.

URL_TEMPLATE = '/security_log{query_string}'

pages.accounts.admin.settings module

The Accounts security log.

class pages.accounts.admin.settings.Settings(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

The Accounts settings page.

URL_TEMPLATE = '/settings'

pages.accounts.admin.users module

Accounts admin user search and editing.

class pages.accounts.admin.users.Actions(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

Accounts user actions.

URL_TEMPLATE = '/admin/users/actions'
mark_as_updated()[source]

Mark all accounts as recently updated.

exception pages.accounts.admin.users.CannotAssignValueException[source]

Bases: Exception

Accounts cannot change values for user with a Salesforce contact.

class pages.accounts.admin.users.Details(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

Accounts user account details.

class App(page, root=None)[source]

Bases: pypom.region.Region

Applications associated with a user.

property app

Return the app name.

view_tutor_data()[source]

View user information on Tutor.

class Email(page, root=None)[source]

Bases: pypom.region.Region

User-assigned email, status, and forced confirmation.

confirm_address()[source]

Force the confirmation of an email.

property email

Return the email address.

property is_confirmed

Return True if the email was confirmed.

URL_TEMPLATE = '/admin/users/{user_id}/edit'
add_email(email)[source]

Add a new email to the account.

property apps

Return the applications in use by the account.

become_user()[source]

Impersonate the user.

property emails

Return the account emails.

property faculty_status

Return the current faculty status.

property first_name

Return the user’s first name.

property has_contact

Return True if the user has a Salesforce contact ID set.

If set, faculty status and school type are controlled from Salesforce and cannot be changed in Accounts.

property is_a_test_user

Return True if the account is or will be a test user.

property is_admin

Return True if the account is or will be an administrator.

property last_name

Return the user’s last name.

property login_methods

Return the list of logins in use by the account.

property name

Return the user’s name.

property new_password

Getter not needed.

remove_contact_id()[source]

Clear the Salesforce contact ID.

property salesforce_contact_id

Return the Salesforce contact ID.

save()[source]

Click the save button to preserve the current account settings.

property school_type

Return the current school type.

toggle_admin()[source]

Click on the admin permissions checkbox.

toggle_tester()[source]

Click on the test user permissions checkbox.

property username

Return the currently assigned username.

view_salesforce_contact()[source]

View the contact information on Salesforce.

view_security_log()[source]

View the security log for the account.

class pages.accounts.admin.users.PreAuth(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

Pre-authenticated users.

class Pending(page, root=None)[source]

Bases: pypom.region.Region

Account signup in a pre-authorization state.

CREATED = 4
EMAIL = 0
PIN = 2
STATE = 1
USER_TYPE = 3
property email

Return the registration email.

property email_state

Return the registration email state.

property requested_on

Return the registration date and time.

Use a timezone-aware datetime.

property user_type

Return the self-reported user type.

property verification_pin

Return the email confirmation pin.

URL_TEMPLATE = '/admin/pre_auth_states'
property requests

Return the list of accounts in a pre-auth state.

view_all()[source]

View all accounts in pre-auth.

view_one_day()[source]

View pre-auth for the past day.

view_one_week()[source]

View pre-auth for the past week.

view_two_weeks()[source]

View pre-auth for the past two weeks.

class pages.accounts.admin.users.Reports(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

User counts.

class Faculty(page, root=None)[source]

Bases: pypom.region.Region

Faculty user breakdown.

CONFIRMED = 1
PENDING = 2
REJECTED = 3
UNKNOWN = 4
property confirmed

Return the total number of confirmed faculty.

property pending

Return the total number of faculty with a pending request.

property rejected

Return the total number of faculty with a rejected request.

property unknown

Return the total number of faculty with an unknown role.

URL_TEMPLATE = '/admin/reports'
class Users(page, root=None)[source]

Bases: pypom.region.Region

Accounts users totals.

INSTRUCTORS = 3
STUDENTS = 2
TOTAL = 1
UNKNOWN = 4
property faculty

Return the number of instructor accounts.

property students

Return the number of student accounts.

property total

Return the total number of user accounts.

property unknown

Return the number of accounts without a set role.

property faculty

Access the faculty totals.

property users

Access the user totals.

class pages.accounts.admin.users.Search(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.admin.base.AccountsAdmin

Accounts admin user search.

class Result(page, root, pos)[source]

Bases: pypom.region.Region

A pair of rows containing account information.

DETAILS = 'tr.details:nth-child({index}) '
class Email(page, root=None)[source]

Bases: pypom.region.Region

An account email.

property email

Return the email address.

property is_confirmed

Return True if the email has been confirmed.

property created_on

Return the account creation date and time.

edit()[source]

Edit the user account data.

property emails

Return the emails associated with the account.

property faculty

Return the faculty status for the account.

property first_name

Return the user’s first name.

property full_name

Return the account user’s full name.

property id

Return the Account ID.

impersonate()[source]

Log in as the user.

property last_name

Return the user’s last name.

property role

Return the user’s self-reported role.

property school_type

Return the account’s associated school type.

property state

Return the account state.

property support_id

Return the account support identification number.

property updated_on

Return the most recent update date and time.

property username

Return the account username.

property uuid

Return the account UUID.

view_security_log()[source]

View the security log for the user.

URL_TEMPLATE = '/admin/users'
find(terms, ordering=None)[source]

Search for a set of terms and order the results.

order_by(**terms)[source]

Enter the ordering.

Ordering options are by field equaling a direction

ie: username=Accounts.ASCENDING to sort by the username in an ascending order

Args:
literal: send a literal string to the ordering bar

overrides other options

username: alpha ordering on usernames first_name: alpha ordering on first names last_name: alpha ordering on last names id: numeric ordering by Accounts IDs role: alpha ordering on user roles

search_for(**terms)[source]

Enter the search terms or name.

Search terms are comma-separated values. Usernames and account holders are wildcard searches while ID, email, and UUID are exact matches. Searches without a term apply to the username, first name, last name, and full name. Two word searches without a term are matched as: first_name:<first_word> last_name:<last_word>

Args:

username: match against the partial or full username field first_name: match against the partial or full first name field last_name: match against the partial or full last name field name: match against the partial or full first name field, last

name field, and full name field

id: match against the exact Accounts user ID email: match against the exact email uuid: match against the exact UUID number

Click the search button.

property users

Access the search results.

view_search_help()[source]

Display the search API help page.

class pages.accounts.admin.users.SearchHelp(driver, base_url=None, timeout=10, **url_kwargs)[source]

Bases: pages.accounts.base.AccountsBase

Accounts admin user search API manual.

URL_TEMPLATE = '/api/docs/v1/users/index'
property at_user_api

Return True if at the user API page.

Module contents