Lines Matching refs:test_policy
33 test_policy = policy.Policy()
34 test_policy.name = 'Test'
35 test_policy.level = 1
36 test_policy.value = 'TheValue'
37 test_policy.scope = 'test_value'
38 test_policy.source = 'Cloud'
39 self.assertEqual(test_policy.name, 'Test')
40 self.assertEqual(test_policy.level, 1)
41 self.assertEqual(test_policy.scope, 'test_value')
42 self.assertEqual(test_policy.source, 'Cloud')
43 self.assertEqual(test_policy.value, 'TheValue')
46 test_policy = policy.Policy()
47 test_policy.name = 'Test'
48 test_policy.group = 'user'
49 self.assertEqual(test_policy.name, 'Test')
50 self.assertEqual(test_policy.source, 'cloud')
51 self.assertEqual(test_policy.level, 'mandatory')
52 self.assertEqual(test_policy.scope, 'user')
55 test_policy = policy.Policy()
56 test_policy.name = 'Test'
57 test_policy.group = 'device'
58 self.assertEqual(test_policy.name, 'Test')
59 self.assertEqual(test_policy.source, 'cloud')
60 self.assertEqual(test_policy.level, 'mandatory')
61 self.assertEqual(test_policy.scope, 'machine')
64 test_policy = policy.Policy()
65 test_policy.name = 'Test'
66 test_policy.group = 'suggested_user'
67 self.assertEqual(test_policy.name, 'Test')
68 self.assertEqual(test_policy.source, 'cloud')
69 self.assertEqual(test_policy.level, 'recommended')
70 self.assertEqual(test_policy.scope, 'user')
73 test_policy = policy.Policy()
74 test_policy.name = 'Test'
77 test_policy.set_policy_from_dict(test_policydict)
79 self.assertEqual(test_policy.name, 'Test')
80 self.assertEqual(test_policy.level, 'testLevel')
81 self.assertEqual(test_policy.scope, 'testScope')
82 self.assertEqual(test_policy.source, 'testSource')
83 self.assertEqual(test_policy.value, 'test_value')
86 test_policy = policy.Policy()
87 test_policy.name = 'Test'
88 test_policy.level = 1
89 test_policy.value = 'TheValue'
90 test_policy.scope = 'test_value'
91 test_policy.source = 'Cloud'
99 self.assertEqual(expected_dict, test_policy.get_policy_as_dict())
102 test_policy = policy.Policy()
103 test_policy.name = 'Test'
104 test_policy.set_policy_from_dict(self.dict_value)
109 self.assertTrue(test_policy == test_policy2)
110 self.assertFalse(test_policy != test_policy2)
115 self.assertFalse(test_policy == test_policy3)
118 test_policy = policy.Policy()
119 test_policy.name = 'Test'
125 test_policy.set_policy_from_dict(test_value)
135 self.assertTrue(test_policy == test_policy2)
136 self.assertFalse(test_policy != test_policy2)
177 test_policy = policy.Policy()
178 test_policy.name = 'Bad Policy'
179 test_policy.set_policy_from_dict({'Invalid Keys': 'Invalid Value'})