Beispiel #1
0
  def get_original_issue(self, issue_id):
    """Get original issue."""
    issue = Issue()
    issue.open = True
    issue.itm = self
    issue.id = issue_id

    if issue_id == 1337:
      issue.add_cc('*****@*****.**')
      issue.add_label('Restrict-View-Commit')
    elif issue_id == 1338:
      issue.add_cc('*****@*****.**')
      issue.add_cc('*****@*****.**')
    elif issue_id == 1340:
      issue.add_label('reported-2015-01-01')

    return issue
Beispiel #2
0
def create_generic_issue(created_days_ago=28):
    """Returns a simple issue object for use in tests."""
    issue = Issue()
    issue.cc = ['*****@*****.**']
    issue.comment = ''
    issue.comments = []
    issue.components = ['Test>Component']
    issue.labels = ['TestLabel', 'Pri-1', 'OS-Windows']
    issue.open = True
    issue.owner = '*****@*****.**'
    issue.status = 'Assigned'
    issue.id = 1
    issue.itm = create_issue_tracker_manager()

    # Test issue was created 1 week before the current (mocked) time.
    issue.created = CURRENT_TIME - datetime.timedelta(days=created_days_ago)

    return issue