diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-26 17:12:18 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-26 17:12:18 -0600 |
| commit | dd34c1ebf4c53bb74e7d2ab64b42517563b6c9a1 (patch) | |
| tree | 258c09ddddec92809d5fb2fa575fdb72e32f6719 /spec/unit/python | |
| parent | 526e6d99a4af45b75dee9a7f00f488fd35e9563e (diff) | |
Add spec for loading spec data from pypi.org
Diffstat (limited to 'spec/unit/python')
| -rw-r--r-- | spec/unit/python/source_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/unit/python/source_spec.rb b/spec/unit/python/source_spec.rb new file mode 100644 index 0000000..01bde3c --- /dev/null +++ b/spec/unit/python/source_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +RSpec.describe Spandx::Python::Source do + context "when fetching metadata for a known package from https://pypi.org" do + subject { described_class.default } + + it 'fetches the correct data' do + VCR.use_cassette('pypi/pytest-5.4.1') do + result = subject.lookup('pytest', '5.4.1') + + expect(result).not_to be_nil + expect(result['info']).not_to be_nil + expect(result['info']['name']).to eql('pytest') + expect(result['info']['version']).to eql('5.4.1') + end + end + end +end |
