'Publishing one page with multiple languages still counts
as one page. This test case checks whether it works
as expected.'

def test_command_line_publish_multiple_languages_check_count(self):

    get_user_model().objects.create_superuser('djangocms', 'cms@example.com', '123456')
    page = create_page('en    title', 'nav_playground.html', 'en', published=True)
    create_title('de', 'de    title', page)
    page.publish('de')
    pages_from_output = 0
    published_from_output = 0
    with StdoutOverride() as buffer:
        call_command('cms', 'publisher-publish')
        lines = buffer.getvalue().split('\n')
    for line in lines:
        if ('Total' in line):
            pages_from_output = int(line.split(':')[1])
        elif ('Published' in line):
            published_from_output = int(line.split(':')[1])
    self.assertEqual(pages_from_output, 1)
    self.assertEqual(published_from_output, 1)
