コード例 #1
0
 def test_get_statistics_policy(self):
     data = {'scope': 'policy', 'domain_id': 'platform', 'policy_id': 111,
             'parameter_name': 'power'}
     expected = ['0x2E', '0xC8', '0x57', '0x01', '0x00', '0x11', '0x00',
                 '0x6F']
     result = commands.get_statistics(data)
     self.assertEqual(expected, result)
コード例 #2
0
 def test_get_statistics_global_without_domain(self):
     data = {'scope': 'global', 'parameter_name': 'response_time'}
     expected = [
         '0x2E', '0xC8', '0x57', '0x01', '0x00', '0x1C', '0x00', '0x00'
     ]
     result = commands.get_statistics(data)
     self.assertEqual(expected, result)
コード例 #3
0
 def test_get_statistics_global(self):
     data = {
         'scope': 'global',
         'domain_id': 'platform',
         'parameter_name': 'power'
     }
     expected = [
         '0x2E', '0xC8', '0x57', '0x01', '0x00', '0x01', '0x00', '0x00'
     ]
     result = commands.get_statistics(data)
     self.assertEqual(expected, result)
コード例 #4
0
 def test_get_statistics_global_without_domain(self):
     data = {'scope': 'global', 'parameter_name': 'response_time'}
     expected = ['0x2E', '0xC8', '0x57', '0x01', '0x00', '0x1C', '0x00',
                 '0x00']
     result = commands.get_statistics(data)
     self.assertEqual(expected, result)