Exemple #1
0
 def test_set_type_mapped(self):
   input = textwrap.dedent("""\
       {
           "project": "chromium-mMM",
           "project_title": "Chromium MMM",
           "ref": "refs/branch-heads/AAAA"
       }""")
   output = branch.set_type(input, ['lts'])
   self.assertEqual(
       output,
       textwrap.dedent("""\
           {
               "project": "chromium-mMM",
               "project_title": "Chromium MMM",
               "ref": "refs/branch-heads/AAAA",
               "branch_types": [
                   "cros-lts"
               ]
           }
           """))
Exemple #2
0
 def test_set_type_standard(self):
     input = textwrap.dedent("""\
     {
         "project": "chromium-mMM",
         "project_title": "Chromium MMM",
         "is_main": true,
         "is_lts_branch": true,
         "ref": "refs/branch-heads/AAAA"
     }""")
     output = branch.set_type(input, 'standard')
     self.assertEqual(
         output,
         textwrap.dedent("""\
         {
             "project": "chromium-mMM",
             "project_title": "Chromium MMM",
             "is_main": false,
             "is_lts_branch": false,
             "ref": "refs/branch-heads/AAAA"
         }
         """))