testPlot.py 751 B

123456789101112131415161718192021222324252627282930
  1. import unittest
  2. from refill.MerchantWriter import MerchantWriter
  3. class MyTestCase(unittest.TestCase):
  4. __redis_host = '192.168.3.104'
  5. # __redis_host = '192.168.3.46'
  6. def test_something(self):
  7. self.assertEqual(True, False) # add assertion here
  8. def test_handler(self):
  9. handler = MerchantWriter(None)
  10. pass
  11. def test_listener(self):
  12. from refill import queueListener
  13. queueListener.set_redis(self.__redis_host,'6379')
  14. queueListener.prepare_data()
  15. def test_jsonLoads(self):
  16. import json
  17. try:
  18. str = 4
  19. x = json.loads(str)
  20. print(x)
  21. except Exception as ex:
  22. print(ex)
  23. if __name__ == '__main__':
  24. unittest.main()