def setUp(self):
        super(ContourAnalysesTestCase, self).setUp()
        self._username = 'minervauser'
        self._password = 'opensesame'
        self._user = self.model('user').createUser(
            self._username, self._password, 'minerva', 'user',
            'minervauser@example.com')

        # Import the analyses
        self._client = GirderClient('localhost', girder_port)
        self._client.authenticate(self._username, self._password)

        path = os.path.dirname(os.path.realpath(__file__))
        analyses_path = os.path.join(path, '../analyses/NEX/')

        import_analyses.import_analyses(self._client, analyses_path)

        # Get the analysis folder
        path = '/minerva_analysis/folder'
        response = self.request(path=path, method='GET', params={}, user=self._user)
        self.assertStatusOk(response)
        analyses_folder = response.json['folder']

        path = '/item'
        params = {
            'folderId': analyses_folder['_id']
        }
        response = self.request(path=path, method='GET', params=params, user=self._user)
        self.assertStatusOk(response)

        # Find the contour analysis
        for analysis in response.json:
            if analysis['name'] == 'contour':
                self._analysis = analysis

        # Now import an S3 prefix
        path = '/minerva_dataset/folder'
        params = {
            'userId': self._user['_id']
        }
        response = self.request(path=path, method='POST', params=params, user=self._user)
        self.assertStatusOk(response)
        folder = response.json['folder']

        # create the item
        params = {
            'name': 'bobby',
            'folderId': folder['_id']
        }
        response = self.request(path='/item', method='POST', params=params, user=self._user)
        self.assertStatusOk(response)
        itemId = response.json['_id']

        # create a s3 dataset from the item
        prefix = '/CMIP5/CommonGrid/hadcm3/rcp45/mon/r1i1p1/pr/'
        bucket = 'nasanex'
        params = {
            'name': 'nasanex',
            'bucket': bucket,
            'prefix': prefix,
            'accessKeyId': '',
            'secret': '',
            'service': '',
            'readOnly': True
        }

        path = '/minerva_dataset_s3/%s/dataset' % str(itemId)
        response = self.request(
            path=path,
            method='POST',
            user=self._user,
            params=params
        )
        self.assertStatusOk(response)

        import_folder_id = response.json['folderId']

        # Wait for import to occur
        time.sleep(10)

        path = '/item'
        params = {
            'folderId': import_folder_id
        }
        response = self.request(path=path, method='GET', user=self._user,
                                params=params)
        self.assertStatusOk(response)
        self.assertEqual(len(response.json), 1, 'Excepting only a single item')

        item_id = str(response.json[0]['_id'])


        # Now list the files
        path = '/item/%s/files' % item_id
        response = self.request(path=path, method='GET', user=self._user)
        self.assertStatusOk(response)
        self.assertEqual(len(response.json), 1, 'Excepting only a single file')

        self._dataset_file_id = response.json[0]['_id']
Test the text representation of a container.
dataset/ETHPy150Open Kitware/minerva/plugin_tests/contour_analysis_test.py/ContourAnalysesTestCase.setUp--crossover with--dataset/ETHPy150Open deis/deis/controller/api/tests/test_container.py/ContainerTest.test_container_str