Add isolated WireGuard module with guarded access modes and server setup
This commit is contained in:
@@ -33,8 +33,10 @@ class Tests(unittest.TestCase):
|
||||
for headers in ({},{'X-Athena-Deck':'1','Origin':'http://evil.invalid'}):
|
||||
with self.assertRaises(urllib.error.HTTPError) as e:self.request('demo/start','POST',headers)
|
||||
self.assertEqual(e.exception.code,403)
|
||||
e.exception.close()
|
||||
with self.assertRaises(urllib.error.HTTPError) as e:self.request('models/start','POST',{'X-Athena-Deck':'1'})
|
||||
self.assertEqual(e.exception.code,404)
|
||||
e.exception.close()
|
||||
def test_unavailable_hardware(self):
|
||||
with patch('server.subprocess.run',side_effect=OSError()):
|
||||
result=HardwareProvider().snapshot()
|
||||
|
||||
Reference in New Issue
Block a user