def test_handles_arg_list_with_defaults(self): conn = mock.Mock() create_connection(conn, 0, ['localhost'], {'foo': 'baz'}) conn.assert_called_once_with(0, 'localhost', foo='baz')
def test_does_apply_defaults(self): conn = mock.Mock() create_connection(conn, 0, {'resp': 'bar'}, {'foo': 'baz'}) conn.assert_called_once_with(0, foo='baz', resp='bar')