Did I find the right examples for you? yes no

All Samples(16)  |  Call(11)  |  Derive(0)  |  Import(5)
Match a dictionary for that contains a specified sub-dictionary.

Specify a dictionary mapping keys (often strings) to matchers.  This is
the 'expected' dict.  Any dictionary that matches this must have **at
least** these keys, and the values must match the corresponding matchers
in the expected dict.  Dictionaries that have more keys will also match.

In other words, any matching dictionary must contain the dictionary given
to the constructor.
(more...)

src/t/r/treeshape-0.2.1/treeshape/_matchers.py   treeshape(Download)
 
from testtools.helpers import map_values
from testtools.matchers import (
    ContainsDict,
    Equals,
        # The pattern is that a user doesn't specify attributes they don't
        # care about.  Thus, we return a ContainsDict matcher.
        return ContainsDict(map_values(_to_matcher, attrs))
 
    def match(self, path):

src/o/t/otter-HEAD/otter/test/test_log.py   otter(Download)
from twisted.trial.unittest import SynchronousTestCase
 
from testtools.matchers import Contains, ContainsDict, Equals
 
from otter.log import audit
 
        self.observer.assert_called_once_with(
            matches(ContainsDict({'traceback': Contains('Traceback')})))
 
    def test_failure_repr_in_short_message(self):
        self.wrapper({'failure': Failure(ValueError()), 'isError': True})
        self.observer.assert_called_once_with(
            matches(ContainsDict({'message': Equals(repr(ValueError()))})))
 
    def test_isError_with_message_instead_of_failure(self):
 
        self.observer.assert_called_once_with(
            matches(ContainsDict({'message': Equals('uh oh')})))
 
    def test_isError_sets_level_3(self):
 
        self.observer.assert_called_once_with(
            matches(ContainsDict({'level': Equals(3)})))
 
    def test_isError_includes_why_in_short_message(self):

src/o/t/otter-HEAD/otter/test/test_supervisor.py   otter(Download)
import mock
 
from testtools.matchers import ContainsDict, Equals, IsInstance
 
from twisted.python.failure import Failure

src/o/t/otter-HEAD/otter/test/test_controller.py   otter(Download)
import mock
 
from testtools.matchers import ContainsDict, Equals
 
from twisted.internet import defer

src/t/x/txpkgme-0.3/txpkgme/tests/test_scoreboard.py   txpkgme(Download)
from StringIO import StringIO
from testtools import TestCase
from testtools.matchers import (
    Contains,
    ContainsDict,