# Path: solvebio/test/helper.py
# class SolveBioTestCase(unittest.TestCase):
#     TEST_DATASET_FULL_PATH = 'solvebio:public:/HGNC/3.3.0-2020-10-29/HGNC'
#     TEST_DATASET_FULL_PATH_2 = 'solvebio:public:/ClinVar/5.1.0-20200720/Variants-GRCH38'
#     TEST_FILE_FULL_PATH = 'solvebio:public:/HGNC/3.3.0-2020-10-29/hgnc_1000_rows.txt'
# 
#     def setUp(self):
#         super(SolveBioTestCase, self).setUp()
#         api_key = os.environ.get('SOLVEBIO_API_KEY', None)
#         api_host = os.environ.get('SOLVEBIO_API_HOST', None)
#         self.client = solvebio.SolveClient(host=api_host, token=api_key)
# 
#     def check_response(self, response, expect, msg):
#         subset = [(key, response[key]) for
#                   key in [x[0] for x in expect]]
#         self.assertEqual(subset, expect)
# 
#     # Python < 2.7 compatibility
#     def assertRaisesRegexp(self, exception, regexp, callable, *args, **kwargs):
#         try:
#             callable(*args, **kwargs)
#         except exception as err:
#             if regexp is None:
#                 return True
# 
#             if isinstance(regexp, six.string_types):
#                 regexp = re.compile(regexp)
#             if not regexp.search(str(err)):
#                 raise self.failureException('\'%s\' does not match \'%s\'' %
#                                             (regexp.pattern, str(err)))
#         else:
#             raise self.failureException(
#                 '%s was not raised' % (exception.__name__,))


from .helper import SolveBioTestCase
            ['myVault', '{0}:myVault'.format(domain)],
            ['{0}:myVault'.format(domain), '{0}:myVault'.format(domain)],
            ['acme:myVault', 'acme:myVault'],
            ['myVault/folder1/folder2: xyz', '{0}:myVault'.format(domain)],
            ['acme:myVault/folder1/folder2: xyz', 'acme:myVault'],
            ['acme:myVault:/folder1/folder2: xyz', 'acme:myVault'],
            # The following are the "new" vault/path formats:
            ['~/', '{0}:{1}'.format(domain, user_vault)],
            ['acme:myVault/uploads_folder', 'acme:myVault'],
            ['myVault/uploads_folder', '{0}:myVault'.format(domain)],
        ]
        for case, expected in test_cases:
            v, v_paths = self.client.Vault.validate_full_path(case)
            self.assertEqual(v, expected)

        error_test_cases = [
            '',
            '/',
            ':',
            ':/',
            '::/',
            'x:',
            # Underscore in domain
            'my_Domain:myVault:/the/heack',
            # Space in domain
            'my Domain:my:Vault:/the/heack',
            # Too many colons
            'myDomain:my:Vault:/the/heack',
            'oops:myDomain:myVault',
        ]

# Path: solvebio/test/helper.py
# class SolveBioTestCase(unittest.TestCase):
#     TEST_DATASET_FULL_PATH = 'solvebio:public:/HGNC/3.3.0-2020-10-29/HGNC'
#     TEST_DATASET_FULL_PATH_2 = 'solvebio:public:/ClinVar/5.1.0-20200720/Variants-GRCH38'
#     TEST_FILE_FULL_PATH = 'solvebio:public:/HGNC/3.3.0-2020-10-29/hgnc_1000_rows.txt'
# 
#     def setUp(self):
#         super(SolveBioTestCase, self).setUp()
#         api_key = os.environ.get('SOLVEBIO_API_KEY', None)
#         api_host = os.environ.get('SOLVEBIO_API_HOST', None)
#         self.client = solvebio.SolveClient(host=api_host, token=api_key)
# 
#     def check_response(self, response, expect, msg):
#         subset = [(key, response[key]) for
#                   key in [x[0] for x in expect]]
#         self.assertEqual(subset, expect)
# 
#     # Python < 2.7 compatibility
#     def assertRaisesRegexp(self, exception, regexp, callable, *args, **kwargs):
#         try:
#             callable(*args, **kwargs)
#         except exception as err:
#             if regexp is None:
#                 return True
# 
#             if isinstance(regexp, six.string_types):
#                 regexp = re.compile(regexp)
#             if not regexp.search(str(err)):
#                 raise self.failureException('\'%s\' does not match \'%s\'' %
#                                             (regexp.pattern, str(err)))
#         else:
#             raise self.failureException(
#                 '%s was not raised' % (exception.__name__,))


# Path: solvebio/test/test_vault.py
from .helper import SolveBioTestCase

            ['myVault', '{0}:myVault'.format(domain)],
            ['{0}:myVault'.format(domain), '{0}:myVault'.format(domain)],
            ['acme:myVault', 'acme:myVault'],
            ['myVault/folder1/folder2: xyz', '{0}:myVault'.format(domain)],
            ['acme:myVault/folder1/folder2: xyz', 'acme:myVault'],
            ['acme:myVault:/folder1/folder2: xyz', 'acme:myVault'],
            # The following are the "new" vault/path formats:
            ['~/', '{0}:{1}'.format(domain, user_vault)],
            ['acme:myVault/uploads_folder', 'acme:myVault'],
            ['myVault/uploads_folder', '{0}:myVault'.format(domain)],
        ]
        for case, expected in test_cases:
            v, v_paths = self.client.Vault.validate_full_path(case)
            self.assertEqual(v, expected)

        error_test_cases = [
            '',
            '/',
            ':',
            ':/',
            '::/',
            'x:',
            # Underscore in domain
            'my_Domain:myVault:/the/heack',
            # Space in domain
            'my Domain:my:Vault:/the/heack',
            # Too many colons
            'myDomain:my:Vault:/the/heack',
            'oops:myDomain:myVault',
        ]

        for case in error_test_cases: