@@ -414,7 +414,6 @@ def test_Delta_license_diff_old_no_license_info(self):
414414 old_file = models .File ({'path' : 'old/path.txt' })
415415
416416 result = deltacode .Delta (new_file , old_file , 'modified' )
417- #result.license_diff()
418417
419418 assert result .category == 'license info added'
420419 assert result .to_dict ().get ('category' ) == 'license info added'
@@ -424,7 +423,6 @@ def test_Delta_license_diff_old_no_license_info_below_cutoff_score(self):
424423 old_file = models .File ({'path' : 'old/path.txt' })
425424
426425 result = deltacode .Delta (new_file , old_file , 'modified' )
427- #result.license_diff()
428426
429427 assert result .category == 'license info added'
430428 assert result .to_dict ().get ('category' ) == 'license info added'
@@ -434,7 +432,6 @@ def test_Delta_license_diff_single_diff_multiple_keys(self):
434432 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 50.0 }]})
435433
436434 result = deltacode .Delta (new_file , old_file , 'modified' )
437- #result.license_diff()
438435
439436 assert result .category == 'license change'
440437
@@ -443,7 +440,6 @@ def test_Delta_license_diff_no_diff_multiple_keys(self):
443440 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 100.0 }]})
444441
445442 result = deltacode .Delta (new_file , old_file , 'modified' )
446- #result.license_diff()
447443
448444 assert result .category == 'modified'
449445
@@ -452,7 +448,6 @@ def test_Delta_license_diff_no_diff_multiple_keys_low_score_new(self):
452448 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 100.0 }]})
453449
454450 result = deltacode .Delta (new_file , old_file , 'modified' )
455- #result.license_diff()
456451
457452 assert result .category == 'modified'
458453
@@ -461,7 +456,6 @@ def test_Delta_license_diff_no_diff_multiple_keys_low_score_old(self):
461456 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 100.0 }, {'key' : 'gpl-2.0' , 'score' : 49.9 }]})
462457
463458 result = deltacode .Delta (new_file , old_file , 'modified' )
464- #result.license_diff()
465459
466460 assert result .category == 'modified'
467461
@@ -470,7 +464,6 @@ def test_Delta_license_diff_single_diff(self):
470464 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 80.0 }]})
471465
472466 result = deltacode .Delta (new_file , old_file , 'modified' )
473- #result.license_diff()
474467
475468 assert result .category == 'license change'
476469
@@ -479,7 +472,6 @@ def test_Delta_license_diff_no_diff(self):
479472 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 95.0 }]})
480473
481474 result = deltacode .Delta (new_file , old_file , 'modified' )
482- #result.license_diff()
483475
484476 assert result .category == 'modified'
485477
@@ -488,28 +480,23 @@ def test_Delta_license_diff_missing_diff_low_score_new(self):
488480 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 95.0 }]})
489481
490482 result = deltacode .Delta (new_file , old_file , 'modified' )
491- #result.license_diff()
492483
493- assert result .category == 'license info removed '
484+ assert result .category == 'license change '
494485
495486 def test_Delta_license_diff_missing_diff_low_score_old (self ):
496487 new_file = models .File ({'path' : 'new/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 95.0 }]})
497488 old_file = models .File ({'path' : 'old/path.txt' , 'licenses' : [{'key' : 'mit' , 'score' : 45.0 }]})
498489
499490 result = deltacode .Delta (new_file , old_file , 'modified' )
500- #result.license_diff()
501491
502- assert result .category == 'license info added '
492+ assert result .category == 'license change '
503493
504494 def test_Delta_license_diff_one_None (self ):
505495 file_obj = models .File ({'path' : 'fake/path.txt' })
506496
507497 first_None = deltacode .Delta (None , file_obj , 'removed' )
508498 second_None = deltacode .Delta (file_obj , None , 'added' )
509499
510- #first_None.license_diff()
511- #second_None.license_diff()
512-
513500 assert first_None .category == 'removed'
514501 assert second_None .category == 'added'
515502
0 commit comments