'Unrecognized narrow operators are rejected.'

def test_bad_narrow_operator(self):

    self.login(self.example_email('hamlet'))
    for operator in ['', 'foo', 'stream:verona', '__init__']:
        narrow = [dict(operator=operator, operand='')]
        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, 'Invalid    narrow    operator:    unknown    operator')
