예제 #1
0
 def test_setup_nacl(self,
                     mock_stderr,
                     mock_stdout,
                     mock_yes_no,
                     mock_input,
                     mock_wunc,
                     mock_gunc):
     setup_nacl()
     output = mock_stdout.getvalue()
     self.assertEqual('\n.nacl file written\n', output)
예제 #2
0
 def test_setup_nacl_no_write(self,
                              mock_stderr,
                              mock_stdout,
                              mock_yes_no,
                              mock_input,
                              mock_wunc,
                              mock_gunc):
     setup_nacl()
     output = mock_stderr.getvalue()
     self.assertEqual('\nSomething went wrong!\n', output)
예제 #3
0
파일: nacl-setup.py 프로젝트: rmatulat/nacl
# -*- coding: utf-8 -*-

"""nacl-setup

Usage:
  nacl-setup.py git
  nacl-setup.py nacl
  nacl-setup.py (-h | --help)
  nacl-setup.py --version

Options:
  git               Setup your local git, e.g. name and email-adress
  nacl              Setup nacl itself (the .nacl.conf file)
  -h --help         Show this screen.
  --version         Show version.

"""
from nacl.setup import setup_git
from nacl.setup import setup_nacl
from vendor.docopt import docopt

if __name__ == "__main__":
    arguments = docopt(__doc__, version="nacl-setup version 0.1")
    # print(arguments)

if arguments["git"]:
    setup_git()

if arguments["nacl"]:
    setup_nacl()