Пример #1
0
 def setUp(self):
     super(MarketingSiteAPIClientTestMixin, self).setUp()
     self.username = FuzzyText().fuzz()
     self.password = FuzzyText().fuzz()
     self.api_root = FuzzyUrlRoot().fuzz()
     self.csrf_token = FuzzyText().fuzz()
     self.user_id = FuzzyInteger(1).fuzz()
Пример #2
0
 def setUp(self):
     super().setUp()
     self.username = FuzzyText().fuzz()
     self.password = FuzzyText().fuzz()
     self.api_root = FuzzyUrlRoot().fuzz()
     self.csrf_token = FuzzyText().fuzz()
     self.user_id = FuzzyInteger(1).fuzz()
Пример #3
0
class PartnerFactory(factory.DjangoModelFactory):
    name = factory.Sequence(lambda n: 'test-partner-{}'.format(n))  # pylint: disable=unnecessary-lambda
    short_code = factory.Sequence(lambda n: 'test{}'.format(n))  # pylint: disable=unnecessary-lambda
    courses_api_url = '{root}/api/courses/v1/'.format(
        root=FuzzyUrlRoot().fuzz())
    lms_coursemode_api_url = '{root}/api/course_mode/v1/'.format(
        root=FuzzyUrlRoot().fuzz())
    ecommerce_api_url = '{root}/api/v2/'.format(root=FuzzyUrlRoot().fuzz())
    organizations_api_url = '{root}/api/organizations/v1/'.format(
        root=FuzzyUrlRoot().fuzz())
    programs_api_url = '{root}/api/programs/v1/'.format(
        root=FuzzyUrlRoot().fuzz())
    marketing_site_api_url = '{root}/api/courses/v1/'.format(
        root=FuzzyUrlRoot().fuzz())
    marketing_site_url_root = factory.Faker('url')
    marketing_site_api_username = factory.Faker('user_name')
    marketing_site_api_password = factory.Faker('password')
    analytics_url = factory.Faker('url')
    analytics_token = factory.Faker('sha256')
    lms_url = ''
    lms_admin_url = '{root}/admin'.format(root=FuzzyUrlRoot().fuzz())
    site = factory.SubFactory(SiteFactory)
    studio_url = factory.Faker('url')
    publisher_url = factory.Faker('url')

    class Meta:
        model = Partner
Пример #4
0
class PartnerFactory(factory.DjangoModelFactory):
    name = factory.Sequence(lambda n: 'test-partner-{}'.format(n))  # pylint: disable=unnecessary-lambda
    short_code = factory.Sequence(lambda n: 'test{}'.format(n))  # pylint: disable=unnecessary-lambda
    courses_api_url = '{root}/api/courses/v1/'.format(root=FuzzyUrlRoot().fuzz())
    ecommerce_api_url = '{root}/api/courses/v1/'.format(root=FuzzyUrlRoot().fuzz())
    organizations_api_url = '{root}/api/organizations/v1/'.format(root=FuzzyUrlRoot().fuzz())
    programs_api_url = '{root}/api/programs/v1/'.format(root=FuzzyUrlRoot().fuzz())
    marketing_site_api_url = '{root}/api/courses/v1/'.format(root=FuzzyUrlRoot().fuzz())
    marketing_site_url_root = '{root}/'.format(root=FuzzyUrlRoot().fuzz())
    marketing_site_api_username = FuzzyText().fuzz()
    marketing_site_api_password = FuzzyText().fuzz()
    oidc_url_root = '{root}'.format(root=FuzzyUrlRoot().fuzz())
    oidc_key = FuzzyText().fuzz()
    oidc_secret = FuzzyText().fuzz()

    class Meta(object):
        model = Partner