Beispiel #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')
Beispiel #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()
Beispiel #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()
Beispiel #4
0
 def setUp(self):
     self.machine = Scramble(self._default_options())
     self.mock_process = mock()
     self.machine.process = self.mock_process