'narrow must be a list of string pairs.'

def test_bad_narrow_type(self):

    self.login(self.example_email('hamlet'))
    other_params = [('anchor', 0), ('num_before', 0), ('num_after', 0)]
    bad_types = (False, 0, '', '{malformed    json,', '{foo:    3}', '[1,2]', '[["x","y","z"]]')
    for type in bad_types:
        post_params = dict((other_params + [('narrow', type)]))
        result = self.client_get('/json/messages', post_params)
        self.assert_json_error(result, ("Bad    value    for    'narrow':    %s" % (type,)))
