Exemplo n.º 1
0
    def testDataFormatVerify(self):
        "Verify that populate() creates the internal dict's properly"
        cc = clientCaps.ClientCapabilities()
        cc.populate(self.caps1)

        keys = cc.keys()
        keys.sort()
        self.assertEqual(self.dataKeysSorted1, keys)

        values = cc.values()
        values.sort()
        self.assertEqual(self.dataValuesSorted1, values)
Exemplo n.º 2
0
    def testHeaderFormatVerify(self):
        "Verify that headerFormat returns proper results"
        cc = clientCaps.ClientCapabilities()
        cc.populate(self.caps1)
        res = cc.headerFormat()
        self.assertEquals(type([]), type(res))
        self.assertTrue(len(res) >= 1)

        for header in res:
            headerName, value = header
            self.assertEqual("X-RHN-Client-Capability", headerName)

        self.assertEqual(res, self.headerFormat1)
 def testHeaderFormat(self):
     "Verify that headerFormat runs without errors"
     cc = clientCaps.ClientCapabilities()
     res = cc.headerFormat()
     self.assertEquals(type([]), type(res))
 def testPopulate(self):
     "Verify the object gets created with an approriate populated data"
     cc = clientCaps.ClientCapabilities()
     len = cc.keys()
     self.assertTrue(len >= 1)
 def testEmptyInit(self):
     "Verify that the class can be created with no arguments"
     cc = clientCaps.ClientCapabilities()