Example #1
0
 def test_get_settings_from_pr_body(self):
     """
     Extract settings from a string containing settings
     """
     settings_str = 'TEST: true\r\nother: false\r\n'
     pr_body = "Description\r\nover\r\nlines\r\n- - -\r\n**Settings**\r\n```yaml\r\n" + settings_str + "```"
     self.assertEqual(github.get_settings_from_pr_body(pr_body), settings_str)
Example #2
0
 def test_get_settings_from_pr_body(self):
     """
     Extract settings from a string containing settings
     """
     settings_str = 'TEST: true\r\nother: false\r\n'
     pr_body = "Description\r\nover\r\nlines\r\n- - -\r\n**Settings**\r\n```yaml\r\n" + settings_str + "```"
     self.assertEqual(github.get_settings_from_pr_body(pr_body),
                      settings_str)
Example #3
0
 def test_get_settings_from_pr_body_not_contain(self):
     """
     Extract settings from a string which doesn't contain settings
     """
     pr_body = "Description\r\nover\r\nlines\r\n- - -\r\n**Settings**\r\nMALFORMED"
     self.assertEqual(github.get_settings_from_pr_body(pr_body), '')
Example #4
0
 def test_get_settings_from_pr_body_not_contain(self):
     """
     Extract settings from a string which doesn't contain settings
     """
     pr_body = "Description\r\nover\r\nlines\r\n- - -\r\n**Settings**\r\nMALFORMED"
     self.assertEqual(github.get_settings_from_pr_body(pr_body), '')