test_commands.py 583B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. import os
  3. import subprocess
  4. import tracim
  5. class TestCommands(object):
  6. def test_commands(self):
  7. """
  8. Test listing of tracimcli command: Tracim commands must be listed
  9. :return:
  10. """
  11. os.chdir(os.path.dirname(tracim.__file__) + '/../')
  12. output = subprocess.check_output(["tracimcli", "-h"])
  13. output = output.decode('utf-8')
  14. assert output.find('user create') > 0
  15. assert output.find('user update') > 0
  16. assert output.find('db init') > 0
  17. assert output.find('db delete') > 0