def setUp(self): """ Setup OCR tests. Creates a test user. """ testutils.symlink_model_fixtures() self.testuser = User.objects.create_user("AnonymousUser", "*****@*****.**", "testpass") self.client = Client() self.client.login(username="******", password="******")
def setUp(self): """ Setup OCR tests. Creates a test user. """ testutils.symlink_model_fixtures() self.testuser = User.objects.create_user("test_user", "*****@*****.**", "testpass") self.client = Client() self.client.login(username="******", password="******")
def setUp(self): """ Setup OCR tests. These run directly, not via views. """ testutils.symlink_model_fixtures() self.validscripts = {} self.invalidscripts = {} for fname in os.listdir(VALID_SCRIPTDIR): if fname.endswith("json"): with open(os.path.join(VALID_SCRIPTDIR, fname), "r") as f: self.validscripts[fname] = json.load(f) for fname in os.listdir(INVALID_SCRIPTDIR): if fname.endswith("json"): with open(os.path.join(INVALID_SCRIPTDIR, fname), "r") as f: self.invalidscripts[fname] = json.load(f)
def setUp(self): """ Setup OCR tests. Creates a test user. """ testutils.symlink_model_fixtures() self.scripts = {} for fname in os.listdir(VALID_SCRIPTDIR): if fname.endswith("json"): with open(os.path.join(VALID_SCRIPTDIR, fname), "r") as f: self.scripts[fname] = json.load(f) for fname in os.listdir(INVALID_SCRIPTDIR): if fname.endswith("json"): with open(os.path.join(INVALID_SCRIPTDIR, fname), "r") as f: self.scripts[fname] = json.load(f) self.testuser = User.objects.create_user("test_user", "*****@*****.**", "testpass") self.client = Client() self.client.login(username="******", password="******")