blob: 117f69bdbd33b8b5ff28ced0f032e622a1f7d885 [file] [log] [blame]
Alex Klein69339cc2019-07-22 14:08:35 -06001# -*- coding: utf-8 -*-
2# Copyright 2019 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6"""API config object."""
7
8from __future__ import print_function
9
10import collections
11
12
13ApiConfig = collections.namedtuple('ApiConfig', ['validate_only'])
14
15
16class ApiConfigMixin(object):
17 """Mixin to add an API Config factory properties.
18
19 This is meant to be used for tests to make these configs more uniform across
20 all of the tests since there's very little to change anyway.
21 """
22
23 @property
24 def api_config(self):
25 return ApiConfig(validate_only=False)
26
27 @property
28 def validate_only_config(self):
29 return ApiConfig(validate_only=True)