def test_cannotSyncWithNoItem(self): item = JiraTrackerItem() self.assertFalse(item.canBeSyncedWith(None))
def test_ifJiraKeyIsDifferentThenCannotSyncWithOtherItem(self): testIssue = self.testIssue() item = JiraTrackerItem(testIssue) toSyncWith = mock() when(toSyncWith).jiraKey().thenReturn("blah") self.assertFalse(item.canBeSyncedWith(toSyncWith))
def test_ifJiraKeyIsSameThenCanSyncWithOtherItem(self): testIssue = self.testIssue() item = JiraTrackerItem(testIssue) toSyncWith = mock() when(toSyncWith).jiraKey().thenReturn(testIssue.key) self.assertTrue(item.canBeSyncedWith(toSyncWith))