コード例 #1
0
ファイル: report_test.py プロジェクト: iamtheonedaone1/Bitch
 def test_list_manifest_warnings(self):
     """Tests that text warnings listed in the manifest are returned."""
     manifest = {
         'name':
         'test',
         'status':
         'partial',
         'warnings': [{
             'member': 'member',
             'text': ['warning A', 'warning B'],
             'status': 'partial'
         }]
     }
     warnings = report.manifest_warnings(manifest, {'test': manifest})
     self.assertEqual(warnings, [
         {
             'member':
             'member',
             'text':
             '<span class="ca-feature partial">chrome.test.member</span>: '
             'warning A'
         },
         {
             'member':
             'member',
             'text':
             '<span class="ca-feature partial">chrome.test.member</span>: '
             'warning B'
         },
     ])
コード例 #2
0
 def test_not_implemented_manifest_warnings(self):
   """Tests that not implemented warnings in the manifest are returned."""
   manifest = {
     'name': 'test',
     'status': 'partial',
     'warnings': ['member']
   }
   warnings = report.manifest_warnings(manifest, {'test': manifest})
   self.assertEqual(warnings,
       [{'member': 'member',
         'text': '<span class="ca-feature none">chrome.test.member</span>: '
                 'Not implemented in the polyfill.'}])
コード例 #3
0
 def test_text_manifest_warnings(self):
   """Tests that text warnings in the manifest are returned."""
   manifest = {
     'name': 'test',
     'status': 'partial',
     'warnings': [
       {'member': 'member',
        'text': 'a warning',
        'status': 'partial'}]
   }
   warnings = report.manifest_warnings(manifest, {'test': manifest})
   self.assertEqual(warnings,
       [{'member': 'member',
         'text': '<span class="ca-feature partial">chrome.test.member</span>: '
                 'a warning'}])
コード例 #4
0
ファイル: report_test.py プロジェクト: iamtheonedaone1/Bitch
 def test_not_implemented_manifest_warnings(self):
     """Tests that not implemented warnings in the manifest are returned."""
     manifest = {
         'name': 'test',
         'status': 'partial',
         'warnings': ['member']
     }
     warnings = report.manifest_warnings(manifest, {'test': manifest})
     self.assertEqual(warnings, [{
         'member':
         'member',
         'text':
         '<span class="ca-feature none">chrome.test.member</span>: '
         'Not implemented in the polyfill.'
     }])