Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moonjck committed Jan 16, 2025
1 parent 419ec37 commit 5f08271
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/testBadSignatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def corruptedVarsExe(
self.assertIsInstance(self.OBS.observation_ts, str)

if magic: # magic bytes may change during gitlab job, can't always test
self.assertEqual(self.OBS.magic, magic)
self.assertIn(self.OBS.magic, magic)

# check signature and authenticode
self.assertEqual(self.OBS.signatures[0]["verification"], sigflag)
Expand Down
16 changes: 8 additions & 8 deletions tests/testObserveRemote.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100600")
self.assertEqual(self.OBS.permissions, "0o100644")

def testConfigJson(self) -> None:
vs = vars(self.OBS)
Expand Down Expand Up @@ -64,7 +64,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100600")
self.assertEqual(self.OBS.permissions, "0o100644")
self.assertEqual(
len(self.OBS.signatures), 0
) # this file is unsigned, should have no signatures
Expand Down Expand Up @@ -111,7 +111,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100700")
self.assertEqual(self.OBS.permissions, "0o100755")

# def test_detect_it_easy(self) -> None:
# expected_output = (
Expand Down Expand Up @@ -155,7 +155,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100600")
self.assertEqual(self.OBS.permissions, "0o100644")

# def test_detect_it_easy(self) -> None:
# expected_output = (
Expand Down Expand Up @@ -229,7 +229,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100700")
self.assertEqual(self.OBS.permissions, "0o100755")
self.assertEqual(len(self.OBS.signatures), 0) # unsigned, should have no signatures

# def test_detect_it_easy(self) -> None:
Expand Down Expand Up @@ -280,7 +280,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100600")
self.assertEqual(self.OBS.permissions, "0o100644")


class ObservationTestCase8(unittest.TestCase):
Expand All @@ -301,7 +301,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100700")
self.assertEqual(self.OBS.permissions, "0o100755")

# def test_detect_it_easy(self) -> None:
# expected_output = (
Expand Down Expand Up @@ -351,7 +351,7 @@ def testVars(self) -> None:
except ValueError:
self.fail()
self.assertIsInstance(self.OBS.observation_ts, str)
self.assertEqual(self.OBS.permissions, "0o100700")
self.assertEqual(self.OBS.permissions, "0o100755")
self.assertEqual(self.OBS.authenticode_integrity, "OK")
self.assertEqual(self.OBS.signatures[0]["verification"], "OK")
self.assertEqual(self.OBS.authentihash, self.OBS.signatures[0]["sha1"])
Expand Down

0 comments on commit 5f08271

Please sign in to comment.