Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop committed Mar 6, 2025
1 parent 3748aec commit f541e97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/schemas/yararule.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from core import database_arango
from core import database_arango, errors
from core.schemas.indicator import DiamondModel
from core.schemas.indicators.yara import Yara

Expand Down Expand Up @@ -35,7 +35,7 @@ def test_yara_name_and_deps(self):
self.assertEqual(yara.dependencies, ["dep"])

def test_invalid_yara_rule(self):
with self.assertRaises(ValueError) as error:
with self.assertRaises(errors.ObjectCreationError) as error:
Yara(
pattern='rule test { wooo: $a = "test" fooo: $a and dep }',
location="any",
Expand All @@ -45,7 +45,7 @@ def test_invalid_yara_rule(self):
self.assertIn("Unknown text wooo", str(error.exception))

def test_fail_on_more_than_one_rule(self):
with self.assertRaises(ValueError) as error:
with self.assertRaises(errors.ObjectCreationError) as error:
Yara(
pattern="rule test { condition: true } rule test2 { condition: true }",
location="any",
Expand Down

0 comments on commit f541e97

Please sign in to comment.