Exemplo n.º 1
0
 def test_hide_personal_info(self):
     sample_exception = "Exception: 400 Bad Request requesting " + \
         "BugSearch https://bugzilla.mozilla.org/bzapi/bug/?&" + \
         "changed_before=2010-12-26&product=Core,Firefox&" + \
         "changed_field=status&changed_after=2010-12-24&" + \
         "include_fields=_default,attachments&changed_field_to=" + \
         "RESOLVED&api_key=xyzxyzxyz&resolution=FIXED"
     assert "xyzxyzxyz" not in hide_personal_info(sample_exception)
Exemplo n.º 2
0
 def test_hide_personal_info(self):
     sample_exception = "Exception: 400 Bad Request requesting " + \
         "BugSearch https://bugzilla.mozilla.org/rest/bug?&" + \
         "changed_before=2010-12-26&product=Core,Firefox&" + \
         "changed_field=status&changed_after=2010-12-24&" + \
         "include_fields=_default,attachments&changed_field_to=" + \
         "RESOLVED&api_key=xyzxyzxyz&resolution=FIXED"
     assert "xyzxyzxyz" not in hide_personal_info(sample_exception)
Exemplo n.º 3
0
    def get_bug(self, bug, include_fields='_default,token,cc,keywords,whiteboard,comments', exclude_fields=None, params={}):
        params['include_fields'] = [include_fields]
        params['exclude_fields'] = [exclude_fields]

        url = urljoin(self.API_ROOT, 'bug/%s?%s' % (bug, self.qs(**params)))
        try:
            return Bug.get(url)
        except Exception as e:
            raise Exception(hide_personal_info(str(e)))
Exemplo n.º 4
0
    def get_bug(self, bug, include_fields='_default', exclude_fields=None, params={}):
        params['include_fields'] = [include_fields]
        params['exclude_fields'] = [exclude_fields]

        url = urljoin(self.API_ROOT, 'bug/%s?%s' % (bug, qs(**params)))
        try:
            return BugSearch.get(url, http=self.http).bugs[0]
        except Exception as e:
            raise Exception(hide_personal_info(str(e)))
Exemplo n.º 5
0
    def get_bug(self, bug, include_fields='_default,token,cc,keywords,whiteboard,comments', exclude_fields=None, params={}):
        params['include_fields'] = [include_fields]
        params['exclude_fields'] = [exclude_fields]

        url = urljoin(self.API_ROOT, 'bug/%s?%s' % (bug, self.qs(**params)))
        try:
            return Bug.get(url)
        except Exception, e:
            raise Exception(hide_personal_info(str(e)))
    def get_bug(self, bug, include_fields='_default', exclude_fields=None, params={}):
        params['include_fields'] = [include_fields]
        params['exclude_fields'] = [exclude_fields]

        url = urljoin(self.API_ROOT, 'bug/%s?%s' % (bug, qs(**params)))
        try:
            return BugSearch.get(url, http=self.http).bugs[0]
        except Exception as e:
            raise Exception(hide_personal_info(str(e)))
Exemplo n.º 7
0
 def get_bug_list(self, params={}):
     url = urljoin(self.API_ROOT, 'bug/?%s' % (self.qs(**params)))
     try:
         return BugSearch.get(url).bugs
     except Exception as e:
         raise Exception(hide_personal_info(str(e)))
Exemplo n.º 8
0
 def get_bug_list(self, params={}):
     url = urljoin(self.API_ROOT, 'bug?%s' % (qs(**params)))
     try:
         return BugSearch.get(url, http=self.http).bugs
     except Exception as e:
         raise Exception(hide_personal_info(str(e)))