twisted.test.test_amp.ListOfTestsMixin class documentationtwisted.test.test_amp
(View In Hierarchy)
Known subclasses: twisted.test.test_amp.ListOfDateTimeTests, twisted.test.test_amp.ListOfDecimalNanTests, twisted.test.test_amp.ListOfDecimalTests, twisted.test.test_amp.ListOfIntegersTests, twisted.test.test_amp.ListOfStringsTests, twisted.test.test_amp.ListOfUnicodeTests
Base class for testing ListOf, a
parameterized zero-or-more argument type.
| Instance Variable | elementType | Subclasses should set this to an Argument instance. The tests
will make a ListOf using
this. |
| Instance Variable | strings | Subclasses should set this to a dictionary mapping some number of keys --
as BYTE strings -- to the correct serialized form for some example values.
These should agree with what elementType
produces/accepts. |
| Instance Variable | objects | Subclasses should set this to a dictionary with the same keys as
strings -- as NATIVE strings -- and with values which are the
lists which should serialize to the values in the strings
dictionary. |
| Method | test_toBox | No summary |
| Method | test_fromBox | ListOf.fromBox reverses the operation performed by
ListOf.toBox. |
Argument instance. The tests
will make a ListOf using
this.
elementType
produces/accepts.
strings -- as NATIVE strings -- and with values which are the
lists which should serialize to the values in the strings
dictionary.
ListOf.toBox extracts the list of objects from the
objects dictionary passed to it, using the name
key also passed to it, serializes each of the elements in that list using
the Argument instance previously passed to its initializer,
combines the serialized results, and inserts the result into the
strings dictionary using the same name key.
ListOf.fromBox reverses the operation performed by
ListOf.toBox.