Пример #1
0
 def test_defaults_multiple(self):
     first = {'first': 1, 'second': 2}
     second = {'first': 0, 'second': 1, 'third': 2}
     data = defaults({'fourth': 3}, first, second)
     self.assertEqual(data, {
         'first': 1,
         'second': 2,
         'third': 2,
         'fourth': 3
     })
Пример #2
0
 def test_defaults_multiple(self):
     first = {'first': 1, 'second': 2}
     second = {'first': 0, 'second': 1, 'third': 2}
     data = defaults({'fourth': 3}, first, second)
     self.assertEqual(data,
                      {'first': 1, 'second': 2, 'third': 2, 'fourth': 3})
Пример #3
0
 def test_defaults(self):
     other = {'key': 'default-value', 'other-key': 'other-value'}
     data = defaults({'key': 'value'}, other)
     self.assertEqual(data, {'key': 'value', 'other-key': 'other-value'})
Пример #4
0
 def test_defaults(self):
     other = {'key': 'default-value', 'other-key': 'other-value'}
     data = defaults({'key': 'value'}, other)
     self.assertEqual(data, {'key': 'value', 'other-key': 'other-value'})
Пример #5
0
 def test_defaults_multiple(self):
     first = {"first": 1, "second": 2}
     second = {"first": 0, "second": 1, "third": 2}
     data = defaults({"fourth": 3}, first, second)
     self.assertEqual(data, {"first": 1, "second": 2, "third": 2, "fourth": 3})
Пример #6
0
 def test_defaults(self):
     other = {"key": "default-value", "other-key": "other-value"}
     data = defaults({"key": "value"}, other)
     self.assertEqual(data, {"key": "value", "other-key": "other-value"})