def setUpClass(cls): TestCase.setUpClass() cls.api_client = APIClient() factories.LocationFactory.reset_sequence(force=True) factories.WeatherDetailFactory.reset_sequence(force=True) cities = factories.LocationFactory.create_batch(3) for city in cities: factories.WeatherDetailFactory.create_batch(20, city=city)
def setUpClass(cls): TestCase.setUpClass() pki = PKI() pki.initialize() entry = CertificateEntry(cls.domain_name, organizationalUnitName='certificates', emailAddress=settings.PENATES_EMAIL_ADDRESS, localityName=settings.PENATES_LOCALITY, countryName=settings.PENATES_COUNTRY, stateOrProvinceName=settings.PENATES_STATE, altNames=[], role=CA) pki.ensure_ca(entry)
def setUpClass(cls): TestCase.setUpClass() cls.dirname = tempfile.mkdtemp() cls.pki = PKI(dirname=cls.dirname) cls.ca_entry = CertificateEntry('test_CA', organizationName='test_org', organizationalUnitName='test_unit', emailAddress='*****@*****.**', localityName='City', countryName='FR', stateOrProvinceName='Province', altNames=[], role=CA_TEST, dirname=cls.dirname)
def setUpClass(cls): """ Delete the existing modulestores, causing them to be reloaded. """ # Clear out any existing modulestores, # which will cause them to be re-created # the next time they are accessed. clear_existing_modulestores() TestCase.setUpClass()
def setUpClass(cls): """ Flush the mongo store and set up templates. """ # Use a uuid to differentiate # the mongo collections on jenkins. cls.orig_modulestore = copy.deepcopy(settings.MODULESTORE) if 'direct' not in settings.MODULESTORE: settings.MODULESTORE['direct'] = settings.MODULESTORE['default'] settings.MODULESTORE['default']['OPTIONS']['collection'] = 'modulestore_%s' % uuid4().hex settings.MODULESTORE['direct']['OPTIONS']['collection'] = 'modulestore_%s' % uuid4().hex xmodule.modulestore.django._MODULESTORES.clear() print settings.MODULESTORE TestCase.setUpClass()
def setUpClass(cls): TestCase.setUpClass() cls.domain = Domain.objects.get_or_create(name=cls.domain_name)[0] d = cls.domain.name # ok Record(domain=cls.domain, type='A', content=cls.ip, name='a.%s' % d).save() Record(domain=cls.domain, type='CNAME', content='a.%s' % d, name='b.%s' % d).save() Record(domain=cls.domain, type='CNAME', content='b.%s' % d, name='c.%s' % d).save() Record(domain=cls.domain, type='CNAME', content='c.%s' % d, name='d.%s' % d).save() Record(domain=cls.domain, type='CNAME', content='d.%s' % d, name='e.%s' % d).save() # loop Record(domain=cls.domain, type='CNAME', content='g.%s' % d, name='f.%s' % d).save() Record(domain=cls.domain, type='CNAME', content='h.%s' % d, name='g.%s' % d).save() Record(domain=cls.domain, type='CNAME', content='f.%s' % d, name='h.%s' % d).save() # no answer Record(domain=cls.domain, type='CNAME', content='j.%s' % d, name='i.%s' % d).save()
def setUpClass(cls): TestCase.setUpClass() WithForm460ADataTest.setUpClass()
def setUpClass(cls): TestCase.setUpClass() cls.PTY_CSV_FILE = op.join(op.dirname(__file__), 'data', 'test_PTY.csv')
def setUpClass(cls): TestCase.setUpClass() cls.PTY_CSV_FILE = op.join( op.dirname(__file__), 'data', 'test_PTY.csv')