diff options
Diffstat (limited to 'spec/unit/python/source_spec.rb')
| -rw-r--r-- | spec/unit/python/source_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/python/source_spec.rb b/spec/unit/python/source_spec.rb index 01bde3c..ccf63d3 100644 --- a/spec/unit/python/source_spec.rb +++ b/spec/unit/python/source_spec.rb @@ -15,4 +15,20 @@ RSpec.describe Spandx::Python::Source do end end end + + context "when fetching metadata for a known package from https://test.pypi.org" do + subject { described_class.new({ 'name' => 'pypi', 'url' => 'https://test.pypi.org/simple', 'verify_ssl' => true }) } + + it 'fetches the correct data' do + VCR.use_cassette('test.pypi/pip-18.1') do + result = subject.lookup('pip', '18.1') + + puts result.inspect + expect(result).not_to be_nil + expect(result['info']).not_to be_nil + expect(result['info']['name']).to eql('pip') + expect(result['info']['version']).to eql('18.1') + end + end + end end |
