

def setUp(self):
    super(AccountsTest, self).setUp()
    self.flags(verbose=True, allow_admin_api=True)
    self.stubs.Set(accounts.Controller, '__init__', fake_init)
    self.stubs.Set(accounts.Controller, '_check_admin', fake_admin_check)
    fakes.FakeAuthManager.clear_fakes()
    fakes.FakeAuthDatabase.data = {
        
    }
    fakes.stub_out_networking(self.stubs)
    fakes.stub_out_rate_limiting(self.stubs)
    fakes.stub_out_auth(self.stubs)
    fakemgr = fakes.FakeAuthManager()
    joeuser = User('id1', 'guy1', 'acc1', 'secret1', False)
    superuser = User('id2', 'guy2', 'acc2', 'secret2', True)
    fakemgr.add_user(joeuser)
    fakemgr.add_user(superuser)
    fakemgr.create_project('test1', joeuser)
    fakemgr.create_project('test2', superuser)

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/api/openstack/test_accounts.py AccountsTest.setUp/original