def test_register_url_name_datatxt(): cache = os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000))) name = pins.board_register(url, name = board, cache = cache) assert name == board pins.board_deregister(name)
def test_register_url_noname_datatxt(): cache = os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000))) name = pins.board_register(url, cache = cache) assert name == 'raw' pin = pins.pin_get('iris', board = url) assert len(pin) == 150
def test_initialize_board_local(board): if (board == "local"): pins.board_register(board, cache=os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000)))) elif (board == "s3"): testS3Bucket = os.environ['AWS_BUCKET'] testS3Key = os.environ['AWS_KEY'] testS3Secret = os.environ['AWS_SECRET'] pins.board_register(board, bucket=testS3Bucket, key=testS3Key, secret=testS3Secret, versions=False, cache=os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000)))) else: assert False
def initialize_board(board, versions): if (board == "local"): cache = os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000))) pins.board_register(board, cache = cache, versions = versions); elif (board == "s3"): testS3Bucket = os.environ['AWS_BUCKET'] testS3Key = os.environ['AWS_KEY'] testS3Secret = os.environ['AWS_SECRET'] pins.board_register( board, bucket = testS3Bucket, key = testS3Key, secret = testS3Secret, versions = False, cache = os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000))) ); elif (board == "rsconnect"): testRSConnectServer = os.environ['RSCONNECT_SERVER'] testRSConnectKey = os.environ['RSCONNECT_KEY'] pins.board_register( board, key = testRSConnectKey, server = testRSConnectServer, versions = False, cache = os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000))) );
def test_register_datatxt(): cache = os.path.join(tempfile.gettempdir(), str(random.randint(1, 100000))) pins.board_register('datatxt', name = board, url = url, cache = cache ) assert board in pins.board_list()
def test_board_register_temp(): board = pins.board_register("local", name="temp", cache="temp-path") assert board == "temp"
def test_board_register_temp(): board = pins.board_register("local", name="temp", cache="temp-path") assert board == "temp" assert_array_equals(pins.board_list(), ["local", "temp"])
def test_board_register_temp(): board = pins.board_register("local", name="temp", cache="temp") assert board == "temp" assert board in pins.board_list()