Back to index

enigmail  1.4.3
Public Member Functions
unit-expandlibs.TestLibDescriptor Class Reference

List of all members.

Public Member Functions

def test_serialize
def test_read

Detailed Description

Definition at line 71 of file unit-expandlibs.py.


Member Function Documentation

def unit-expandlibs.TestLibDescriptor.test_read (   self)
Test LibDescriptor's initialization

Definition at line 84 of file unit-expandlibs.py.

00084 
00085     def test_read(self):
00086         '''Test LibDescriptor's initialization'''
00087         desc_list = ["# Comment",
00088                      "%s = a b" % LibDescriptor.KEYS[1],
00089                      "", # Empty line
00090                      "foo = bar", # Should be discarded
00091                      "%s = c d e" % LibDescriptor.KEYS[0]]
00092         desc = LibDescriptor(desc_list)
00093         self.assertEqual(desc[LibDescriptor.KEYS[1]], ['a', 'b'])
00094         self.assertEqual(desc[LibDescriptor.KEYS[0]], ['c', 'd', 'e'])
00095         self.assertEqual(False, 'foo' in desc)

Here is the call graph for this function:

def unit-expandlibs.TestLibDescriptor.test_serialize (   self)
Test LibDescriptor's serialization

Definition at line 72 of file unit-expandlibs.py.

00072 
00073     def test_serialize(self):
00074         '''Test LibDescriptor's serialization'''
00075         desc = LibDescriptor()
00076         desc[LibDescriptor.KEYS[0]] = ['a', 'b']
00077         self.assertEqual(str(desc), "%s = a b" % LibDescriptor.KEYS[0])
00078         desc['unsupported-key'] = ['a']
00079         self.assertEqual(str(desc), "%s = a b" % LibDescriptor.KEYS[0])
00080         desc[LibDescriptor.KEYS[1]] = ['c', 'd', 'e']
00081         self.assertEqual(str(desc), "%s = a b\n%s = c d e" % (LibDescriptor.KEYS[0], LibDescriptor.KEYS[1]))
00082         desc[LibDescriptor.KEYS[0]] = []
00083         self.assertEqual(str(desc), "%s = c d e" % (LibDescriptor.KEYS[1]))

Here is the call graph for this function:


The documentation for this class was generated from the following file: