'We expect search operands to be strings, not integers.'

def test_non_string_narrow_operand_in_dict(self):

    self.login(self.example_email('hamlet'))
    not_a_string = 42
    narrow = [dict(operator='stream', operand=not_a_string)]
    params = dict(anchor=0, num_before=0, num_after=0, narrow=ujson.dumps(narrow))
    result = self.client_get('/json/messages', params)
    self.assert_json_error_contains(result, 'elem["operand"]    is    not    a    string')
