def test_blank_around_delimiters(self):
     test_input = ' room = 123456 , auth_token = ' + 'a' * 40 + ' '
     test_output = {'room': '123456', 'auth_token': 'a' * 40}
     assert test_output == parse_destination(test_input)
 def test_auth_key_boundary_short(self):
     test_input = 'room=123456,auth_token=a'
     test_output = {'room': '123456', 'auth_token': 'a'}
     assert test_output == parse_destination(test_input)
 def test_undefined_key(self):
     test_input = 'room=123456,auth_token=' + 'a' * 40 + ',a=b'
     test_output = {'room': '123456', 'auth_token': 'a' * 40}
     assert test_output == parse_destination(test_input)
 def test_no_auth_key(self):
     test_input = 'room=123456'
     with pytest.raises(KeyError):
         parse_destination(test_input)
 def test_auth_key_too_short(self):
     test_input = 'room=123456,auth_token='
     with pytest.raises(KeyError):
         parse_destination(test_input)
 def test_room_too_long(self):
     test_input = 'room=' + 'a' * 101 + ',auth_token=' + 'a' * 40
     with pytest.raises(ValueError):
         parse_destination(test_input)
 def test_room_boundary_long(self):
     test_input = 'room=' + 'a' * 100 + ',auth_token=' + 'a' * 40
     test_output = {'room': 'a' * 100, 'auth_token': 'a' * 40}
     assert test_output == parse_destination(test_input)
 def test_room_too_short(self):
     test_input = 'room=,auth_token=' + 'a' * 40
     with pytest.raises(KeyError):
         parse_destination(test_input)
 def test_no_room(self):
     test_input = 'auth_token=' + 'a' * 40
     with pytest.raises(KeyError):
         parse_destination(test_input)
 def test_blank_string(self):
     test_input = ''
     with pytest.raises(KeyError):
         parse_destination(test_input)