예제 #1
0
class TestScramble(unittest.TestCase):
    def _default_options(self):
        options = Options()
        opts = options.parse()
        return opts

    def setUp(self):
        self.machine = Scramble(self._default_options())
        self.mock_process = mock()
        self.machine.process = self.mock_process

    def test_machine_should_get_date(self):
        self.machine.date()
        verify(self.mock_process).execute('date')
예제 #2
0
import sys

from lib import Scramble
from lib import Options

''' This utility prints all combination of characters of input text '''

if __name__ == '__main__':
    options = Options()
    opts = options.parse(sys.argv[1:])

    v = Scramble(opts)
    v.date()
    v.print_example_arg()
    v.scramble()
예제 #3
0
import sys

from lib import Scramble
from lib import Options
''' This utility prints all combination of characters of input text '''

if __name__ == '__main__':
    options = Options()
    opts = options.parse(sys.argv[1:])

    v = Scramble(opts)
    v.date()
    v.print_example_arg()
    v.scramble()
예제 #4
0
 def setUp(self):
     self.machine = Scramble(self._default_options())
     self.mock_process = mock()
     self.machine.process = self.mock_process