Skip to content

Commit 080e163

Browse files
committed
Use correct imports in tests
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent ac4f7dc commit 080e163

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/licensedcode/test_detect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from licensedcode.legalese import build_dictionary_from_iterable
2020
from licensedcode.match import LicenseMatch
2121
from licensedcode.models import load_rules
22-
from licensedcode.models import Rule
2322
from licensedcode.spans import Span
2423
from licensedcode.tracing import get_texts
2524
from licensedcode_test_utils import mini_legalese
25+
from licensedcode_test_utils import create_rule_from_text_and_expression
2626
from licensedcode_test_utils import create_rule_from_text_file_and_expression
2727

2828
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')

tests/licensedcode/test_index.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from licensedcode.tracing import get_texts
2323
from licensedcode_test_utils import mini_legalese
2424
from licensedcode_test_utils import create_rule_from_text_file_and_expression
25+
from licensedcode_test_utils import create_rule_from_text_and_expression
2526

2627

2728
def MiniLicenseIndex(*args, **kwargs):
@@ -69,7 +70,7 @@ def test_index_structures(self):
6970
(u'the lgpl', (2, 0, 2, 0)),
7071
]
7172
idx = MiniLicenseIndex()
72-
rules = [models.create_rule_from_text_and_expression(text=t[0]) for t in test_rules]
73+
rules = [create_rule_from_text_and_expression(text=t[0]) for t in test_rules]
7374
idx._add_rules(rules, _legalese=mini_legalese,)
7475

7576
assert idx.len_legalese == 40
@@ -224,7 +225,7 @@ class TestMatchNoTemplates(IndexTesting):
224225

225226
def test_match_exact_from_string_once(self):
226227
rule_text = 'Redistribution and use in source and binary forms, with or without modification, are permitted'
227-
idx = MiniLicenseIndex([models.create_rule_from_text_and_expression(text=rule_text, license_expression='bsd')])
228+
idx = MiniLicenseIndex([create_rule_from_text_and_expression(text=rule_text, license_expression='bsd')])
228229
querys = '''
229230
The
230231
Redistribution and use in source and binary forms, with or without modification, are permitted.

0 commit comments

Comments
 (0)