diff options
Diffstat (limited to 'grumpy/testsuite/__init__.py')
-rw-r--r-- | grumpy/testsuite/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/grumpy/testsuite/__init__.py b/grumpy/testsuite/__init__.py index 92290d0..4884a04 100644 --- a/grumpy/testsuite/__init__.py +++ b/grumpy/testsuite/__init__.py @@ -12,9 +12,16 @@ import unittest from grumpy import app from grumpy.models import db +from pkgcore.ebuild import ebuild_src class GrumpyTestCase(unittest.TestCase): + def get_pkg(self, cpv, data={}): + o = ebuild_src.base(*([] + [None, cpv])) + if data is not None: + object.__setattr__(o, 'data', data) + return o + def setUp(self): app.config['SQLALCHEMY_ENGINE'] = 'sqlite://' app.config['TESTING'] = True |