Esempio n. 1
0
 def test_wp_admins(self):
     user = WPUser(Utils.get_mandatory_env(key="WP_ADMIN_USER"),
                   Utils.get_mandatory_env(key="WP_ADMIN_EMAIL"),
                   role='administrator')
     expected = repr(user)
     assert Utils.run_command('python {} admins {} {}'.format(
         SCRIPT_FILE, OPENSHIFT_ENV, SITE_URL_SPECIFIC)) == expected
Esempio n. 2
0
 def test_password(self):
     user = WPUser(settings.OPENSHIFT_ENV, "*****@*****.**")
     assert user.password is None
     user.set_password()
     assert len(user.password) == WPUser.WP_PASSWORD_LENGTH