import unittest
from app import redact_secrets
class T(unittest.TestCase):
 def test_all(self):
  src={'user':'a','apiToken':'x','nested':[{'Password':'p','ok':1}],'secret_note':'n'}
  out={'user':'a','apiToken':'[REDACTED]','nested':[{'Password':'[REDACTED]','ok':1}],'secret_note':'[REDACTED]'}
  self.assertEqual(redact_secrets(src),out)
  self.assertEqual(src['apiToken'],'x')
if __name__=='__main__': unittest.main()
