version: '2'
services:
  test:
    extends:
      file: docker-compose-base.yml
      service: base
    command: python manage.py test -v2
    env_file:
        - conf/test.env
  sut:
    image: ubuntu
    command: "true"

version: '2'
services:
  test:
    extends:
      file: docker-compose-base.yml
      service: base
    entrypoint: python manage.py test -v2
    env_file:
        - conf/test.env
  sut:
    image: ubuntu
    command: "true"

Change test compose command with entrypoint
Change test compose command with entrypoint

This means you can add e.g. --failfast, or run specific tests
