'`showmigrations --plan app_label` raises an error when no app or
no migrations are present in provided app labels.'

@override_settings(INSTALLED_APPS=['migrations.migrations_test_apps.unmigrated_app'])
def test_showmigrations_plan_app_label_error(self):

    with self.assertRaisesMessage(CommandError, 'No    migrations    present    for:    unmigrated_app'):
        call_command('showmigrations', 'unmigrated_app', format='plan')
    with self.assertRaisesMessage(CommandError, 'No    migrations    present    for:    nonexistent_app'):
        call_command('showmigrations', 'nonexistent_app', format='plan')
    with self.assertRaisesMessage(CommandError, 'No    migrations    present    for:    nonexistent_app1,    nonexistent_app2'):
        call_command('showmigrations', 'nonexistent_app1', 'nonexistent_app2', format='plan')
    with self.assertRaisesMessage(CommandError, 'No    migrations    present    for:    nonexistent_app1,    nonexistent_app2'):
        call_command('showmigrations', 'nonexistent_app2', 'nonexistent_app1', format='plan')
