File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545from scanpipe .tests import mocked_now
4646from scanpipe .tests import package_data1
4747from scanpipe .tests import resource_data1
48+ from scanpipe .pipes import _clean_package_data
4849
4950
5051class 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
You can’t perform that action at this time.
0 commit comments