def test_doNotOverwriteWithUnknownOwner(self):
     item = JiraTrackerItem()
     withAssignee = "assignee"
     load = self.create_loader(JiraTrackerItem.withOwner)
     load(item, withAssignee)
     item.withOwner(JiraUser(None))
     self.assertEqual(withAssignee, item.owner().jira())
 def test_canChangeAssignee(self):
     item = JiraTrackerItem()        
     assignee = "me"
     item.withOwner(JiraUser(assignee))
     self.assertEqual(assignee, item.owner().jira())
     self.assertEqual(assignee, item.underlying().assignee())
     self.assertEqual(item.piecesToUpdate(), [{'id':"assignee" , 'values':[assignee,]}])
Ejemplo n.º 3
0
 def test_doNotOverwriteWithUnknownOwner(self):
     item = JiraTrackerItem()
     withAssignee = "assignee"
     load = self.create_loader(JiraTrackerItem.withOwner)
     load(item, withAssignee)
     item.withOwner(JiraUser(None))
     self.assertEqual(withAssignee, item.owner().jira())
 def test_canOverwriteKnownAssignee(self):
     item = JiraTrackerItem()
     withAssignee = "assignee"
     load = self.create_loader(JiraTrackerItem.withOwner)
     load(item, withAssignee)
     random = "me"
     item.withOwner(JiraUser(random))
     self.assertEqual(random, item.owner().jira())
Ejemplo n.º 5
0
 def test_canOverwriteKnownAssignee(self):
     item = JiraTrackerItem()
     withAssignee = "assignee"
     load = self.create_loader(JiraTrackerItem.withOwner)
     load(item, withAssignee)
     random = "me"
     item.withOwner(JiraUser(random))
     self.assertEqual(random, item.owner().jira())
 def test_doNotOverwriteUnknownAssignee(self):
     PivotalToJiraUserMap().reset()
     item = JiraTrackerItem()
     withAssignee = "assignee"
     load = self.create_loader(JiraTrackerItem.withOwner)
     load(item, withAssignee)
     PivotalToJiraUserMap().reset()
     random = "me"
     item.withOwner(JiraUser(random))
     self.assertNotEqual(random, item.owner().jira())
     self.assertEqual(withAssignee, item.owner().jira())
Ejemplo n.º 7
0
 def test_doNotOverwriteUnknownAssignee(self):
     PivotalToJiraUserMap().reset()
     item = JiraTrackerItem()
     withAssignee = "assignee"
     load = self.create_loader(JiraTrackerItem.withOwner)
     load(item, withAssignee)
     PivotalToJiraUserMap().reset()
     random = "me"
     item.withOwner(JiraUser(random))
     self.assertNotEqual(random, item.owner().jira())
     self.assertEqual(withAssignee, item.owner().jira())
Ejemplo n.º 8
0
 def test_canChangeAssignee(self):
     item = JiraTrackerItem()
     assignee = "me"
     item.withOwner(JiraUser(assignee))
     self.assertEqual(assignee, item.owner().jira())
     self.assertEqual(assignee, item.underlying().assignee())
     self.assertEqual(item.piecesToUpdate(), [{
         'id': "assignee",
         'values': [
             assignee,
         ]
     }])
 def test_doNotAddDuplicateAssignee(self):
     testTicket = mock()
     item = JiraTrackerItem(testTicket)
     item.withOwner(JiraUser(testTicket.assignee)) 
     self.assertEqual(item.piecesToUpdate(), [])
Ejemplo n.º 10
0
 def test_doNotAddDuplicateAssignee(self):
     testTicket = mock()
     item = JiraTrackerItem(testTicket)
     item.withOwner(JiraUser(testTicket.assignee))
     self.assertEqual(item.piecesToUpdate(), [])