Пример #1
0
def wp_generator_specific():
    # To generate website with specific plugin list/configuration
    generator = MockedWPGenerator(settings.OPENSHIFT_ENV,
                                  SITE_URL_SPECIFIC,
                                  wp_default_site_title="My test")
    generator.clean()
    generator.generate()
    return generator
Пример #2
0
def wp_generator_generic():
    # To generate website with generic plugin list/configuration
    generator = MockedWPGenerator(settings.OPENSHIFT_ENV,
                                  SITE_URL_GENERIC,
                                  wp_default_site_title="My test",
                                  unit_name='idevelop')
    generator.clean()
    generator.generate()
    return generator
Пример #3
0
 def wp_generator(self):
     generator = MockedWPGenerator(
         OPENSHIFT_ENV,
         "http://" + HTTPD_CONTAINER + "/folder",
         wp_default_site_title="Upload test",
         admin_password="******")
     generator.clean()
     generator.generate()
     command = "option add plugin:epfl_tequila:has_dual_auth 1"
     if not generator.run_wp_cli(command):
         raise ValueError("Could not set option on generated site")
     return generator
Пример #4
0
def wp_generator_specific():
    # To generate website with specific plugin list/configuration
    generator = MockedWPGenerator({
        'openshift_env': settings.OPENSHIFT_ENV,
        'wp_site_url': SITE_URL_SPECIFIC,
        'wp_site_title': "TEST",
        'wp_tagline': "My Test",
        'unit_name': UNIT_NAME
    })
    generator.clean()
    generator.generate()
    return generator
Пример #5
0
def wp_generator_generic():
    # To generate website with generic plugin list/configuration
    generator = MockedWPGenerator({
        'openshift_env': settings.OPENSHIFT_ENV,
        'wp_site_url': SITE_URL_GENERIC,
        'wp_site_title': "TEST",
        'wp_tagline': "My Test",
        'langs': 'en',
        'unit_name': UNIT_NAME,
        'category': settings.DEFAULT_WP_SITE_CATEGORY
    })
    generator.clean()
    generator.generate()
    return generator
Пример #6
0
 def wp_generator(self):
     generator = MockedWPGenerator(
         {
             'openshift_env': OPENSHIFT_ENV,
             'wp_site_url': "https://" + HTTPD_CONTAINER + "/folder",
             'wp_site_title': "UP",
             'wp_tagline': "upload test"
         },
         admin_password="******")
     generator.clean()
     generator.generate()
     command = "option add plugin:epfl_tequila:has_dual_auth 1"
     if not generator.run_wp_cli(command):
         raise ValueError("Could not set option on generated site")
     return generator