def METHOD_NAME(self, tmpdir):
    p = tmpdir.join("config.yaml")
    p.write(
        """
    targets:
      test1:
        resources:
        - AndroidUSBFastboot:
            name: "fastboot"
            match: {}
        - RawSerialPort:
            name: "serial_a"
            port: "/dev/ttyUSB0"
            speed: 115200
        - cls: RawSerialPort
          name: "serial_b"
          port: "/dev/ttyUSB0"
          speed: 115200
        drivers:
        - FakeConsoleDriver:
            name: "serial_a"
        - FakeConsoleDriver:
            name: "serial_b"
    """
    )
    e = Environment(str(p))
    t = e.get_target("test1")