def setUp(self):

        super(TestCase, self).setUp()

        # Sleeps are for real testing, but unit tests shouldn't need them
        realsleep = time.sleep

        def _nosleep(seconds):
            return realsleep(seconds * 0.0001)

        self.sleep_fixture = self.useFixture(fixtures.MonkeyPatch(
                                             'time.sleep',
                                             _nosleep))

        # Isolate os-client-config from test environment
        config = tempfile.NamedTemporaryFile(delete=False)
        config.write(bytes(yaml.dump(self.CLOUD_CONFIG).encode('utf-8')))
        config.close()
        vendor = tempfile.NamedTemporaryFile(delete=False)
        vendor.write(b'{}')
        vendor.close()

        self.config = occ.OpenStackConfig(
            config_files=[config.name],
            vendor_files=[vendor.name])
        self.cloud_config = self.config.get_one_cloud(cloud='_test_cloud_')
        self.cloud = shade.OpenStackCloud(
            cloud_config=self.cloud_config,
            log_inner_exceptions=True)
Returns true if running as a staging server.
dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/base.py/TestCase.setUp--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/environ.py/ServerEnvironment.IsStaging