Integrate reviewed full action pack admission and bounded idle scheduling
This commit is contained in:
@@ -120,6 +120,16 @@ class PackageTests(unittest.TestCase):
|
||||
self.assertNotEqual(result.returncode,0);self.assertIn('read-only gate supported',result.stderr)
|
||||
self.assertFalse(out.exists())
|
||||
|
||||
def test_reviewed_full_admission_exact_duration_pin(self):
|
||||
index=self.dance_index();pin='a'*64;registry=self.base/'approved.json'
|
||||
registry.write_text(json.dumps({pin:{'asset_01':1000,'asset_02':1000}}))
|
||||
self.assertEqual(pack.reviewed_actions(index,pin,registry),{'asset_01':1000,'asset_02':1000})
|
||||
with self.assertRaisesRegex(ValueError,'pin/duration'): pack.reviewed_actions(index,'b'*64,registry)
|
||||
registry.write_text(json.dumps({pin:{'asset_01':999,'asset_02':1000}}))
|
||||
with self.assertRaisesRegex(ValueError,'pin/duration'): pack.reviewed_actions(index,pin,registry)
|
||||
index['actions'][0]['mouthAllowed']=True
|
||||
with self.assertRaisesRegex(ValueError,'dance shape'): pack.reviewed_actions(index,pin,registry)
|
||||
|
||||
def test_paths(self):
|
||||
for name in ('../x','x/../y','x//y','/x','x/./y','https://host/x','x\\y'):
|
||||
with self.subTest(name=name),self.assertRaises(ValueError): pack.relative(name)
|
||||
|
||||
Reference in New Issue
Block a user