Beispiel #1
0
    def testRemoveFooter(self):
        self.assertEqual(git_footers.remove_footer('message', 'Key'),
                         'message')

        self.assertEqual(
            git_footers.remove_footer('message\n\nSome: footer', 'Key'),
            'message\n\nSome: footer')

        self.assertEqual(
            git_footers.remove_footer('message\n\nSome: footer\nKey: value',
                                      'Key'), 'message\n\nSome: footer')

        self.assertEqual(
            git_footers.remove_footer(
                'message\n\nKey: value\nSome: footer\nKey: value', 'Key'),
            'message\n\nSome: footer')
Beispiel #2
0
  def testRemoveFooter(self):
    self.assertEqual(
        git_footers.remove_footer('message', 'Key'),
        'message')

    self.assertEqual(
        git_footers.remove_footer('message\n\nSome: footer', 'Key'),
        'message\n\nSome: footer')

    self.assertEqual(
        git_footers.remove_footer('message\n\nSome: footer\nKey: value', 'Key'),
        'message\n\nSome: footer')

    self.assertEqual(
        git_footers.remove_footer(
            'message\n\nKey: value\nSome: footer\nKey: value', 'Key'),
        'message\n\nSome: footer')