Ejemplo n.º 1
0
 def setup_class(cls):
     # Set up the RoundupTrackerModel that will be used here.
     cls.tm = ObjectFromDict(
         dict(
             tracker_name='Python',
             base_url='http://bugs.python.org/',
             closed_status='resolved',
             bitesized_field='Keywords',
             bitesized_text='easy',
             documentation_field='Components',
             documentation_text='Documentation',
             as_appears_in_distribution='',
         ))
     cls.im = bugimporters.roundup.RoundupBugImporter(
         cls.tm, bugimporters.tests.ReactorManager(), data_transits=None)
Ejemplo n.º 2
0
 def setup_class(cls):
     # Set up the RoundupTrackerModel that will be used here.
     cls.tm = ObjectFromDict(
         dict(
             tracker_name='Mercurial',
             base_url='http://mercurial.selenic.com/bts/',
             closed_status='resolved',
             bitesized_field='Topics',
             bitesized_text='bitesized',
             documentation_field='Topics',
             documentation_text='documentation',
             as_appears_in_distribution='',
             bugimporter='roundup.RoundupBugImporter',
             queries=[
                 'http://mercurial.selenic.com/bts/issue?@action=export_csv&@columns=id,activity,title,creator,status&@sort=-activity&@group=priority&@filter=status,assignedto&@pagesize=50&@startwith=0&status=-1,1,2,3,4,5,6,7,9,10'
             ],
         ))
     cls.im = bugimporters.roundup.RoundupBugImporter(
         cls.tm, bugimporters.tests.ReactorManager(), data_transits=None)
Ejemplo n.º 3
0
    def test_create_google_data_dict_without_status(self):
        atom_dict = {
            'id': {
                'text':
                'http://code.google.com/feeds/issues/p/sympy/issues/full/1215'
            },
            'published': {
                'text': '2008-11-24T11:15:58.000Z'
            },
            'updated': {
                'text': '2009-12-06T23:01:11.000Z'
            },
            'title': {
                'text': 'fix html documentation'
            },
            'content': {
                'text':
                """http://docs.sympy.org/modindex.html

I don't see for example the solvers module"""
            },
            'author': {
                'name': {
                    'text': 'fabian.seoane'
                }
            },
            'cc': [{
                'username': {
                    'text': 'asmeurer'
                }
            }],
            'owner': {
                'username': {
                    'text': 'Vinzent.Steinberg'
                }
            },
            'label': [{
                'text': 'Type-Defect'
            }, {
                'text': 'Priority-Critical'
            }, {
                'text': 'Documentation'
            }, {
                'text': 'Milestone-Release0.6.6'
            }],
            'state': {
                'text': 'closed'
            },
            'status':
            None
        }
        bug_atom = ObjectFromDict(atom_dict, recursive=True)
        gbp = GoogleBugParser(
            bug_url='http://code.google.com/p/sympy/issues/detail?id=1215')
        gbp.bug_atom = bug_atom

        got = gbp.get_parsed_data_dict(MockGoogleTrackerModel)
        wanted = {
            'title':
            'fix html documentation',
            'description':
            """http://docs.sympy.org/modindex.html

I don't see for example the solvers module""",
            'status':
            '',
            'importance':
            'Critical',
            'people_involved':
            3,
            'date_reported': (datetime.datetime(2008, 11, 24, 11, 15,
                                                58).isoformat()),
            'last_touched': (datetime.datetime(2009, 12, 06, 23, 01,
                                               11).isoformat()),
            'looks_closed':
            True,
            'submitter_username':
            '******',
            'submitter_realname':
            '',
            'canonical_bug_link':
            'http://code.google.com/p/sympy/issues/detail?id=1215',
            'good_for_newcomers':
            False,
            'concerns_just_documentation':
            True,
            '_project_name':
            'SymPy',
        }