Skip to content
This repository
tree: 1139999d4a
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 26 lines (18 sloc) 0.767 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/env python

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.


class MockRun(dict):

    def __init__(self, **kwargs):
        # set your default values

        self['name'] = 'Test Run'
        self['product_version'] = 'Test Product Test Version'
        self['desc'] = 'This is a test run'
        self['start_date'] = '2011-01-01'
        self['end_date'] = '2012-12-31'
        self['suite_list'] = None
 
        # update with any keyword arguments passed
        self.update(**kwargs)

    # allow getting items as if they were attributes
    def __getattr__(self, attr):
        return self[attr]
Something went wrong with that request. Please try again.