~free.ekanayaka/landscape-client/lucid-1.5.4-0ubuntu0.10.04.0

« back to all changes in this revision

Viewing changes to landscape/tests/test_schema.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-06-28 18:07:18 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100628180718-vytyqgbtkiirv5sb
Tags: 1.5.2.1-0ubuntu0.10.04.0
Filter duplicate network interfaces in get_active_interfaces (LP: #597000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
        """The C{type} should be introspectable on L{Message} objects."""
254
254
        schema = Message("foo", {})
255
255
        self.assertEquals(schema.type, "foo")
 
256
 
 
257
    def test_message_with_unknown_fields(self):
 
258
        """
 
259
        The L{Message} schema discards unknown fields when coercing values.
 
260
        """
 
261
        schema = Message("foo", {})
 
262
        self.assertEqual({"type": "foo"},
 
263
                         schema.coerce({"type": "foo", "crap": 123}))