'Test that parse_limits() handles multiple rules correctly.'

def test_multiple_rules(self):

    try:
        l = limits.Limiter.parse_limits('(get,    *,    .*,    20,    minute);(PUT,    /foo*,    /foo.*,    10,    hour);(POST,    /bar*,    /bar.*,    5,    second);(Say,    /derp*,    /derp.*,    1,    day)')
    except ValueError as e:
        self.assertFalse(six.text_type(e))
    self.assertEqual(4, len(l))
    expected = ['GET', 'PUT', 'POST', 'SAY']
    self.assertEqual(expected, [t.verb for t in l])
    expected = ['*', '/foo*', '/bar*', '/derp*']
    self.assertEqual(expected, [t.uri for t in l])
    expected = ['.*', '/foo.*', '/bar.*', '/derp.*']
    self.assertEqual(expected, [t.regex for t in l])
    expected = [20, 10, 5, 1]
    self.assertEqual(expected, [t.value for t in l])
    expected = [limits.PER_MINUTE, limits.PER_HOUR, limits.PER_SECOND, limits.PER_DAY]
    self.assertEqual(expected, [t.unit for t in l])
