Esempio n. 1
0
    def test_pull_command(self):
        # Call the pull command
        transifex.pull()
        # conf/locale/config.yaml specifies two non-source locales, 'fr' and 'zh_CN'
        self.assertEqual(2, self.mock_execute.call_count)

        call_args = [('tx pull --mode=reviewed -l fr', ),
                     ('tx pull --mode=reviewed -l zh_CN', )]
        self.assertEqual(
            call_args,
            [callarg[0] for callarg in self.mock_execute.call_args_list])
Esempio n. 2
0
    def test_pull_command(self):
        # Call the pull command
        transifex.pull()
        # conf/locale/config.yaml specifies two non-source locales, 'fr' and 'zh_CN'
        self.assertEqual(2, self.mock_execute.call_count)

        call_args = [('tx pull --mode=reviewed -l fr',), ('tx pull --mode=reviewed -l zh_CN',)]
        self.assertEqual(
            call_args,
            [callarg[0] for callarg in self.mock_execute.call_args_list]
        )
Esempio n. 3
0
    def test_pull_command(self):
        # Call the pull command
        transifex.pull(self.configuration)

        call_args = [
            ('tx pull -f --mode=reviewed -l en', ),
            ('tx pull -f --mode=reviewed -l fr', ),
            ('tx pull -f --mode=reviewed -l zh_CN', ),
        ]
        self.assertEqual(
            call_args,
            [callarg[0] for callarg in self.mock_execute.call_args_list])
Esempio n. 4
0
    def test_pull_command(self):
        # Call the pull command
        transifex.pull(self.configuration)

        call_args = [
            ('tx pull -f --mode=reviewed --minimum-perc=3 -l en',),
            ('tx pull -f --mode=reviewed --minimum-perc=3 -l fr',),
            ('tx pull -f --mode=reviewed --minimum-perc=3 -l zh_CN',),
        ]
        self.assertEqual(
            call_args,
            [callarg[0] for callarg in self.mock_execute.call_args_list]
        )
    def test_pull_command_with_resources(self):
        # Call the pull command
        transifex.pull("foo.1", "foo.2")

        # conf/locale/config.yaml specifies two non-source locales, 'fr' and 'zh_CN'
        call_args = [
            ('tx pull -f --mode=reviewed -l fr -r foo.1', ),
            ('tx pull -f --mode=reviewed -l fr -r foo.2', ),
            ('tx pull -f --mode=reviewed -l zh_CN -r foo.1', ),
            ('tx pull -f --mode=reviewed -l zh_CN -r foo.2', ),
        ]
        self.assertEqual(
            call_args,
            [callarg[0] for callarg in self.mock_execute.call_args_list])
Esempio n. 6
0
    def test_pull_command_with_resources(self):
        # Call the pull command
        transifex.pull("foo.1", "foo.2")

        # conf/locale/config.yaml specifies two non-source locales, 'fr' and 'zh_CN'
        call_args = [
            ('tx pull -f --mode=reviewed -l fr -r foo.1',),
            ('tx pull -f --mode=reviewed -l fr -r foo.2',),
            ('tx pull -f --mode=reviewed -l zh_CN -r foo.1',),
            ('tx pull -f --mode=reviewed -l zh_CN -r foo.2',),
        ]
        self.assertEqual(
            call_args,
            [callarg[0] for callarg in self.mock_execute.call_args_list]
        )