import unittest
from app import flatten_dict
class T(unittest.TestCase):
 def test_all(self):
  src={'a':{'b':2,'c':{'d':3}},'x':{},'z':1}
  self.assertEqual(flatten_dict(src),{'a.b':2,'a.c.d':3,'x':{},'z':1})
  self.assertEqual(src,{'a':{'b':2,'c':{'d':3}},'x':{},'z':1})
if __name__=='__main__': unittest.main()
