def METHOD_NAME(self):
    import_rpm = pkg_resources.resource_filename('bkr.inttest.server',
                                             'task-rpms/tmp-test-cannot-add-duplicate-tasks-1.1.1-0.noarch.rpm')
    run_client(['bkr', 'task-add', import_rpm])
    try:
        # run this task-add twice to make duplicate error will show.
        run_client(['bkr', 'task-add', import_rpm])
        self.fail('should raise')
    except ClientError as e:
        self.assertEqual(e.status, 1)
        self.assertIn('Cannot import duplicate task', e.stderr_output)