def METHOD_NAME(self):
    service_connection = MockConnection()
    self.contents = '0123456789'
    bucket = MockBucket(service_connection, 'mybucket')
    key = bucket.new_key('mykey')
    key.set_contents_from_string(self.contents)
    self.keyfile = KeyFile(key)