예제 #1
0
    def testCreationEmpty_01(self):
        self._config.dateTimeFormat.value = '%d.%m.%Y'

        command = CommandDateCreation(self.parser)
        params = ''

        result = command.execute(params, '')

        result_right = "20.08.2014"

        self.assertEqual(result_right, result)
예제 #2
0
    def testCreationParams_03(self):
        self._config.dateTimeFormat.value = '%c'

        command = CommandDateCreation(self.parser)
        params = 'format="%d.%m Абырвалг"'

        result = command.execute(params, '')

        result_right = "20.08 Абырвалг"

        self.assertEqual(result_right, result)
예제 #3
0
    def testCreationParams_03(self):
        self._config.dateTimeFormat.value = '%c'

        command = CommandDateCreation(self.parser)
        params = 'format="%d.%m Абырвалг"'

        result = command.execute(params, '')

        result_right = "20.08 Абырвалг"

        self.assertEqual(result_right, result)
예제 #4
0
    def testCreationEmpty_02(self):
        self._config.dateTimeFormat.value = '%d.%m'

        command = CommandDateCreation(self.parser)
        params = ''

        result = command.execute(params, '')

        result_right = "20.08"

        self.assertEqual(result_right, result)