def testMapArtifactsToTriggers(self):
    """Identify the artifacts that should be collected based on criteria."""
    # Test whether all expected checks were mapped.
    expect = set(["DebianPackagesStatus", "SshdConfigFile"])
    result = set(checks.CheckRegistry.SelectArtifacts(os_name="Linux"))
    residual = result - expect
    self.assertFalse(residual)

    expect = set(["WMIInstalledSoftware"])
    result = set(checks.CheckRegistry.SelectArtifacts(os_name="Windows"))
    residual = expect - result
    self.assertFalse(residual)

    expect = set(["DebianPackagesStatus"])
    result = set(checks.CheckRegistry.SelectArtifacts(
        os_name=None, cpe=None, labels="foo"))
    residual = expect - result
    self.assertFalse(residual)

    expect = set(["DebianPackagesStatus"])
    result = set(checks.CheckRegistry.SelectArtifacts(
        os_name="Linux", restrict_checks=["SW-CHECK"]))
    self.assertItemsEqual(expect, result)
dataset/ETHPy150Open google/grr/grr/lib/checks/checks_test.py/CheckRegistryTests.testMapArtifactsToTriggers/swapped operands of `-`