示例#1
0
    def test_should_show_failure(self):
        # Given
        enabled = False
        created = {
            statiki.SCRIPT: False,
            '.travis.yml': True
        }

        # When
        message = statiki.get_display_response(enabled, created)['message']

        # Then
        self.assertEqual(messages.TOTAL_FAILURE, message)
示例#2
0
    def test_should_show_partial_success(self):
        # Given
        enabled = True
        created = {
            statiki.SCRIPT: False,
            '.travis.yml': True
        }

        # When
        message = statiki.get_display_response(enabled, created)['message']

        # Then
        self.assertEqual(messages.ONLY_HOOKS_ENABLED, message)
示例#3
0
    def test_should_show_success(self):
        # Given
        enabled = True
        created = {
            statiki.SCRIPT: True,
            '.travis.yml': True
        }

        # When
        message = statiki.get_display_response(enabled, created)['message']

        # Then
        self.assertEqual(messages.DONE, message)