'we should be able to re-upload the same keys'

@defer.inlineCallbacks
def test_reupload_one_time_keys(self):

    local_user = ('@boris:' + self.hs.hostname)
    device_id = 'xyz'
    keys = {'alg1:k1': 'key1', 'alg2:k2': {'key': 'key2', 'signatures': {'k1': 'sig1'}}, 'alg2:k3': {'key': 'key3'}}
    res = (yield self.handler.upload_keys_for_user(local_user, device_id, {'one_time_keys': keys}))
    self.assertDictEqual(res, {'one_time_key_counts': {'alg1': 1, 'alg2': 2}})
    keys['alg2:k2']['signatures']['k1'] = 'sig2'
    res = (yield self.handler.upload_keys_for_user(local_user, device_id, {'one_time_keys': keys}))
    self.assertDictEqual(res, {'one_time_key_counts': {'alg1': 1, 'alg2': 2}})
