Skip to content

Commit 72679c1

Browse files
committed
Fix indentation and import location for boolean normalization test
Signed-off-by: Monal-Reddy <monalreddy001@gmail.com>
1 parent c0803fd commit 72679c1

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

scanpipe/tests/pipes/test_pipes.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from scanpipe.tests import mocked_now
4646
from scanpipe.tests import package_data1
4747
from scanpipe.tests import resource_data1
48+
from scanpipe.pipes import _clean_package_data
4849

4950

5051
class ScanPipePipesTest(TestCase):
@@ -448,18 +449,20 @@ def test_scanpipe_pipes_collect_and_create_codebase_resources(self):
448449
self.assertEqual("from", from_resource.tag)
449450
to_resource = p1.codebaseresources.get(path="to/a.txt")
450451
self.assertEqual("to", to_resource.tag)
451-
452+
452453
def test_clean_package_data_normalizes_boolean_strings():
453-
from scanpipe.pipes import _clean_package_data
454+
package_data = {
455+
"type": "npm",
456+
"name": "react",
457+
"version": "1.0",
458+
"is_virtual": "true",
459+
}
460+
cleaned = _clean_package_data(package_data)
461+
assert cleaned["is_virtual"] is True
462+
463+
464+
454465

455-
package_data = {
456-
"type": "npm",
457-
"name": "react",
458-
"version": "1.0",
459-
"is_virtual": "true",
460-
}
461466

462-
cleaned = _clean_package_data(package_data)
463467

464-
assert cleaned["is_virtual"] is True
465468

0 commit comments

Comments
 (0)