def test_from_uri(self): # will be absolute path test_file_path = os.path.join(TEST_DATA_DIR, "test_file.dat") print("Test file path:", test_file_path) e = DataFileElement.from_uri(test_file_path) self.assertIsInstance(e, DataFileElement) self.assertEqual(e._filepath, test_file_path) self.assertEqual(e.get_bytes(), six.b('')) e = DataFileElement.from_uri('file://' + test_file_path) self.assertIsInstance(e, DataFileElement) self.assertEqual(e._filepath, test_file_path) self.assertEqual(e.get_bytes(), six.b(''))
def test_from_uri(self): # will be absolute path test_file_path = os.path.join(TEST_DATA_DIR, "test_file.dat") print("Test file path:", test_file_path) e = DataFileElement.from_uri(test_file_path) self.assertIsInstance(e, DataFileElement) self.assertEqual(e._filepath, test_file_path) self.assertEqual(e.get_bytes(), six.b('')) e = DataFileElement.from_uri('file://' + test_file_path) self.assertIsInstance(e, DataFileElement) self.assertEqual(e._filepath, test_file_path) self.assertEqual(e.get_bytes(), six.b(''))
def test_from_uri(self): # will be absolute path test_file_path = os.path.join(TEST_DATA_DIR, "test_file.dat") print("Test file path:", test_file_path) e = DataFileElement.from_uri(test_file_path) ntools.assert_is_instance(e, DataFileElement) ntools.assert_equal(e._filepath, test_file_path) ntools.assert_equal(e.get_bytes(), '') e = DataFileElement.from_uri('file://' + test_file_path) ntools.assert_is_instance(e, DataFileElement) ntools.assert_equal(e._filepath, test_file_path) ntools.assert_equal(e.get_bytes(), '')