mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-04-30 20:24:32 +02:00
Normalized Python Dist names
This commit is contained in:
@@ -115,8 +115,7 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
||||
final Dependency result = new Dependency(BaseTest.getResourceAsFile(
|
||||
this, "python/site-packages/Django-1.7.2.dist-info/METADATA"));
|
||||
djangoAssertions(result);
|
||||
assertEquals("Django-1.7.2.dist-info/METADATA", result.getDisplayFileName());
|
||||
}
|
||||
}
|
||||
|
||||
private void djangoAssertions(final Dependency result)
|
||||
throws AnalysisException {
|
||||
@@ -131,6 +130,10 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
||||
}
|
||||
}
|
||||
assertTrue("Version 1.7.2 not found in Django dependency.", found);
|
||||
assertEquals("1.7.2",result.getVersion());
|
||||
assertEquals("Django",result.getName());
|
||||
assertEquals("Django:1.7.2",result.getDisplayFileName());
|
||||
assertEquals(PythonDistributionAnalyzer.DEPENDENCY_ECOSYSTEM,result.getDependencyEcosystem());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -183,5 +186,9 @@ public class PythonDistributionAnalyzerTest extends BaseTest {
|
||||
}
|
||||
}
|
||||
assertTrue("Version 0.0.1 not found in EggTest dependency.", found);
|
||||
assertEquals("0.0.1",result.getVersion());
|
||||
assertEquals("EggTest",result.getName());
|
||||
assertEquals("EggTest:0.0.1",result.getDisplayFileName());
|
||||
assertEquals(PythonDistributionAnalyzer.DEPENDENCY_ECOSYSTEM,result.getDependencyEcosystem());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user