Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(14)  |  Derive(0)  |  Import(1)

src/f/l/flashproxy-HEAD/flashproxy/test/test_fac.py   flashproxy(Download)
#!/usr/bin/env python
 
import unittest
 
from flashproxy.fac import parse_transaction, read_client_registrations
    def testSingle(self):
        l = list(read_client_registrations(""))
        self.assertEqual(len(l), 0)
        l = list(read_client_registrations("client=1.2.3.4:1111"))
        self.assertEqual(len(l), 1)
        self.assertEqual(l[0].addr, ("1.2.3.4", 1111))
        l = list(read_client_registrations("client=1.2.3.4:1111\n"))
        self.assertEqual(len(l), 1)
        self.assertEqual(l[0].addr, ("1.2.3.4", 1111))
        l = list(read_client_registrations("foo=bar&client=1.2.3.4:1111&baz=quux"))