예제 #1
0
    def test_appendDuration_zero_days(self):
        runner = MagicMock()

        mattermost = MattermostNotifier(runner)

        mattermost.appendDuration(0)
        mattermost.send()

        text = """Sync: 0 days"""

        runner.send.assert_called_with(text)
예제 #2
0
    def test_appendDuration_one_day(self):
        runner = MagicMock()

        mattermost = MattermostNotifier(runner)

        mattermost.appendDuration(1)
        mattermost.send()

        text = """Sync: 1 day"""

        runner.send.assert_called_with(text)