예제 #1
0
    def test_that_it_applies_values_only_if_not_present(self):
        defaults = {'foo': 'bar', 'baz': 'car'}

        self.assertEqual({
            'foo': 'qar',
            'baz': 'car'
        }, apply_defaults_from(defaults, {'foo': 'qar'}))
예제 #2
0
    def test_that_it_applies_values_from_a_dict_to_another(self):
        defaults = {'foo': 'bar'}

        self.assertEqual(defaults, apply_defaults_from(defaults, to={}))
예제 #3
0
    def test_that_it_applies_values_from_a_dict_to_another(self):
        defaults = {'foo': 'bar'}

        self.assertEqual(defaults, apply_defaults_from(defaults, to={}))
예제 #4
0
    def test_that_it_applies_values_only_if_not_present(self):
        defaults = {'foo': 'bar', 'baz': 'car'}

        self.assertEqual({'foo': 'qar', 'baz': 'car'},
                         apply_defaults_from(defaults, {'foo': 'qar'}))