Skip to content
This repository
tree: a8fe475c0b
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 28 lines (20 sloc) 0.869 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 26 27
#!/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 MockCase(dict):

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

        self['name'] = 'Test Case'
        self['product'] = 'Test Product'
        self['version'] = 'Test Version'
        self['suite'] = None
        self['desc'] = 'This is a test case'
        self['step1_instruction'] = 'Test Case step 1 instruction'
        self['step1_result'] = 'Test Case step 1 expected result'
        self['status'] = 'active'

        # 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.