Esempio n. 1
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)))
    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)))
Esempio n. 3
0
 def qs(self, **params):
     if self.api_key:
         params['api_key'] = [self.api_key]
     return qs(**params)
Esempio n. 4
0
 def test_qs(self):
     param = {'product': ['Core,Firefox']}
     _qs = qs(**param)
     expected_qs = '&product=Core,Firefox'
     assert_equals(_qs, expected_qs)
Esempio n. 5
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)))
Esempio n. 6
0
 def test_qs(self):
     param = {'product': ['Core,Firefox']}
     _qs = qs(**param)
     expected_qs = '&product=Core,Firefox'
     assert_equals(_qs, expected_qs)
Esempio n. 7
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)))
Esempio n. 8
0
 def qs(self, **params):
     if self.api_key:
         params['api_key'] = [self.api_key]
     return qs(**params)