def test_format_reference_no_notest(self):
        ref = Reference(source_test=self.claim_1)
        expected = (':italics_tested:\n' ':*formatted_claim_1\n')
        self.assertEqual(PreviewItem.format_reference(ref), expected)

        self.mock_format_claim.assert_called_once_with(self.claim_1)
        self.mock_italics.assert_called_once_with('tested')
    def test_format_reference_basic(self):
        ref = Reference(
            source_test=[self.claim_1, self.claim_2],
            source_notest=[self.claim_3, self.claim_4]
        )
        expected = (
            ':italics_tested:\n'
            ':*formatted_claim_1\n'
            ':*formatted_claim_2\n'
            ':italics_not tested:\n'
            ':*formatted_claim_3\n'
            ':*formatted_claim_4\n'
        )
        self.assertEqual(PreviewItem.format_reference(ref), expected)

        self.mock_format_claim.assert_has_calls([
            mock.call(self.claim_1),
            mock.call(self.claim_2),
            mock.call(self.claim_3),
            mock.call(self.claim_4)
        ])
        self.mock_italics.assert_has_calls([
            mock.call('tested'),
            mock.call('not tested')
        ])
    def test_format_reference_no_notest(self):
        ref = Reference(source_test=self.claim_1)
        expected = (
            ':italics_tested:\n'
            ':*formatted_claim_1\n'
        )
        self.assertEqual(PreviewItem.format_reference(ref), expected)

        self.mock_format_claim.assert_called_once_with(self.claim_1)
        self.mock_italics.assert_called_once_with('tested')
    def test_format_reference_basic(self):
        ref = Reference(source_test=[self.claim_1, self.claim_2],
                        source_notest=[self.claim_3, self.claim_4])
        expected = (':italics_tested:\n'
                    ':*formatted_claim_1\n'
                    ':*formatted_claim_2\n'
                    ':italics_not tested:\n'
                    ':*formatted_claim_3\n'
                    ':*formatted_claim_4\n')
        self.assertEqual(PreviewItem.format_reference(ref), expected)

        self.mock_format_claim.assert_has_calls([
            mock.call(self.claim_1),
            mock.call(self.claim_2),
            mock.call(self.claim_3),
            mock.call(self.claim_4)
        ])
        self.mock_italics.assert_has_calls(
            [mock.call('tested'), mock.call('not tested')])