summaryrefslogtreecommitdiff
path: root/spec/unit/python
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/python')
-rw-r--r--spec/unit/python/source_spec.rb18
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