

def setUp(self):
    super(FlushViewTest, self).setUp()
    self.events = []
    bucket = MINIMALIST_BUCKET.copy()
    self.alice_headers = self.headers.copy()
    self.alice_headers.update(**get_user_headers('alice'))
    alice_principal = 'basicauth:8df4b22019cc89d0bb679bc51373a9da56a7ae9978c52fbe684510c3d257c855'
    bucket['permissions'] = {
        'write': [alice_principal],
    }
    self.app.put_json('/buckets/beers', bucket, headers=self.headers)
    self.app.put_json('/buckets/beers/collections/barley', MINIMALIST_COLLECTION, headers=self.headers)
    self.app.post_json(self.collection_url, MINIMALIST_RECORD, headers=self.headers, status=201)
    self.app.post_json(self.collection_url, MINIMALIST_RECORD, headers=self.alice_headers, status=201)

dataset/ETHPy150Open Kinto/kinto/kinto/tests/test_views_flush.py FlushViewTest.setUp/original