def setUp(self):
     bug_number = 489656
     bmo = BMOAgent()
     self.bug = bmo.get_bug(bug_number)
     self.people = PhonebookDirectory(dryrun=True, isTest=True)
     hidden_dict = {
         'id': 123456,
         'summary': 'hide me',
         'assigned_to_detail': {
             'real_name': 'nobody'
         },
         'groups': [{
             'name': 'security group'
         }]
     }
     hidden_dict.update({
         'cf_status_firefox' + version: '---'
         for version in getVersions()
     })
     self.hidden_bug = Bug.from_dict(hidden_dict)
     assignee = '*****@*****.**'
     self.manager = {
         'mozillaMail': '*****@*****.**',
         'bugzillaEmail': '*****@*****.**'
     }
     self.person = {
         'mozillaMail': '*****@*****.**',
         'bugzillaEmail': '*****@*****.**'
     }
Exemplo n.º 2
0
 def setUp(self):
     bug_number = 489656
     bmo = BMOAgent()
     self.bug = bmo.get_bug(bug_number)
     self.people = PhonebookDirectory(dryrun=True)
     assignee = '*****@*****.**'
     self.manager = {'mozillaMail': '*****@*****.**',
                     'bugzillaEmail': '*****@*****.**'}
     self.person = {'mozillaMail': '*****@*****.**',
                     'bugzillaEmail': '*****@*****.**'}
Exemplo n.º 3
0
 def setUp(self):
     bug_number = 489656
     bmo = BMOAgent()
     self.bug = bmo.get_bug(bug_number)
     self.people = PhonebookDirectory(dryrun=True)
     assignee = '*****@*****.**'
     self.manager = {
         'mozillaMail': '*****@*****.**',
         'bugzillaEmail': '*****@*****.**'
     }
     self.person = {
         'mozillaMail': '*****@*****.**',
         'bugzillaEmail': '*****@*****.**'
     }
Exemplo n.º 4
0
 def test_BugSearch(self):
     # Set whatever REST API options we want
     options = {
         'chfieldfrom': ['2012-12-24'],
         'chfieldto': ['2012-12-27'],
         'chfield': ['bug_status'],
         'chfieldvalue': ['RESOLVED'],
         'product': ['Firefox'],
         'resolution': ['FIXED'],
         'include_fields': ['attachments'],
     }
     # Load our agent for BMO
     bmo = BMOAgent()
     # Get the bugs from the api
     buglist = bmo.get_bug_list(options)
     assert buglist != []
 def test_BugSearch(self):
     # Set whatever REST API options we want
     options = {
         'chfieldfrom': ['2012-12-24'],
         'chfieldto': ['2012-12-27'],
         'chfield': ['bug_status'],
         'chfieldvalue': ['RESOLVED'],
         'product': ['Firefox'],
         'resolution': ['FIXED'],
         'include_fields': ['attachments'],
     }
     # Load our agent for BMO
     bmo = BMOAgent()
     # Get the bugs from the api
     buglist = bmo.get_bug_list(options)
     assert buglist != []
Exemplo n.º 6
0
 def setUp(self):
     bug_number = 489656
     bmo = BMOAgent()
     self.bug = bmo.get_bug(bug_number)
     self.people = PhonebookDirectory(dryrun=True, isTest=True)
     hidden_dict = {
             'id': 123456,
             'summary': 'hide me',
             'assigned_to_detail': {'real_name': 'nobody'},
             'groups': [{'name': 'security group'}]}
     hidden_dict.update({'cf_status_firefox' + version: '---'
                         for version in getVersions()})
     self.hidden_bug = Bug.from_dict(hidden_dict)
     assignee = '*****@*****.**'
     self.manager = {'mozillaMail': '*****@*****.**',
                     'bugzillaEmail': '*****@*****.**'}
     self.person = {'mozillaMail': '*****@*****.**',
                     'bugzillaEmail': '*****@*****.**'}
Exemplo n.º 7
0
    options, args = parser.parse_known_args()

    people = phonebook.PhonebookDirectory(dryrun=options.dryrun)

    try:
        int(options.days_since_comment)
    except ValueError:
        if options.days_since_comment is not None:
            parser.error("Need to provide a number for days \
                    since last comment value")
    if options.email_cc_list is None:
        options.email_cc_list = DEFAULT_CC

    # Load our agent for BMO
    bmo = BMOAgent(options.bz_api_key)

    # Get the buglist(s)
    collected_queries = {}
    for query in options.queries:
        # import the query
        if os.path.exists(query):
            info = {}
            execfile(query, info)
            query_name = info['query_name']
            if query_name not in collected_queries:
                collected_queries[query_name] = {
                    'channel': info.get('query_channel', ''),
                    'bugs': [],
                    'cclist': options.email_cc_list,
                }
Exemplo n.º 8
0
from auto_nag.bugzilla.agents import BMOAgent

bug_number = 656222
# Load our agent for BMO
bmo = BMOAgent()
bug = bmo.get_bug(bug_number)


class TestModels:
    # Test bugzilla agent methods
    def test_BugSearch(self):
        # Set whatever REST API options we want
        options = {
            'chfieldfrom': ['2012-12-24'],
            'chfieldto': ['2012-12-27'],
            'chfield': ['bug_status'],
            'chfieldvalue': ['RESOLVED'],
            'product': ['Firefox'],
            'resolution': ['FIXED'],
            'include_fields': ['attachments'],
        }
        # Load our agent for BMO
        bmo = BMOAgent()
        # Get the bugs from the api
        buglist = bmo.get_bug_list(options)
        assert buglist != []

    def test_BugAttributes(self):
        attrs = ['summary', 'id', 'assigned_to', 'creator', 'target_milestone',
                 'attachments', 'comments', 'history', 'keywords', 'status',
from auto_nag.bugzilla.agents import BMOAgent

bug_number = 656222
# Load our agent for BMO
bmo = BMOAgent()
bug = bmo.get_bug(bug_number)


class TestModels:
    # Test bugzilla agent methods
    def test_BugSearch(self):
        # Set whatever REST API options we want
        options = {
            'chfieldfrom': ['2012-12-24'],
            'chfieldto': ['2012-12-27'],
            'chfield': ['bug_status'],
            'chfieldvalue': ['RESOLVED'],
            'product': ['Firefox'],
            'resolution': ['FIXED'],
            'include_fields': ['attachments'],
        }
        # Load our agent for BMO
        bmo = BMOAgent()
        # Get the bugs from the api
        buglist = bmo.get_bug_list(options)
        assert buglist != []

    def test_BugAttributes(self):
        attrs = [
            'summary', 'id', 'assigned_to', 'creator', 'target_milestone',
            'attachments', 'comments', 'history', 'keywords', 'status',
Exemplo n.º 10
0
    options, args = parser.parse_known_args()

    people = phonebook.PhonebookDirectory(dryrun=options.dryrun)

    try:
        int(options.days_since_comment)
    except ValueError:
        if options.days_since_comment is not None:
            parser.error("Need to provide a number for days \
                    since last comment value")
    if options.email_cc_list is None:
        options.email_cc_list = DEFAULT_CC

    # Load our agent for BMO
    bmo = BMOAgent(options.bz_api_key)

    # Get the buglist(s)
    collected_queries = {}
    for query in options.queries:
        # import the query
        if os.path.exists(query):
            info = {}
            execfile(query, info)
            query_name = info['query_name']
            if query_name not in collected_queries:
                collected_queries[query_name] = {
                    'channel': info.get('query_channel', ''),
                    'bugs': [],
                    'cclist': options.email_cc_list,
                }