diff options
| author | Tetiana Chupryna <tchupryna@gitlab.com> | 2020-07-24 17:33:41 +0300 |
|---|---|---|
| committer | Tetiana Chupryna <tchupryna@gitlab.com> | 2020-08-21 13:09:12 +0300 |
| commit | 3b32a036bf5aa4497cb4bbeb91c2cacf22f5d146 (patch) | |
| tree | 48a16b80a1e3cecad147fc687c572622ed1df600 | |
| parent | a2a1e0d8ea63b9735fe5fc85f35d61f3f2dada9c (diff) | |
Test with separate specs
| -rw-r--r-- | normalized-licenses.yml | 1 | ||||
| -rw-r--r-- | spec/integration/python/pip_spec.rb | 30 |
2 files changed, 23 insertions, 8 deletions
diff --git a/normalized-licenses.yml b/normalized-licenses.yml index 2961e06..4df6161 100644 --- a/normalized-licenses.yml +++ b/normalized-licenses.yml @@ -8,6 +8,7 @@ ids: Apache Software License - Version 2.0: Apache-2.0 ASF 2.0: Apache-2.0 ASL, version 2: Apache-2.0 + BSD: bsd BSD 3-Clause: BSD-3-Clause BSD (3 clause): BSD-3-Clause BSD-derived (http://www.repoze.org/LICENSE.txt): BSD-2-Clause diff --git a/spec/integration/python/pip_spec.rb b/spec/integration/python/pip_spec.rb index 84fbd89..cead027 100644 --- a/spec/integration/python/pip_spec.rb +++ b/spec/integration/python/pip_spec.rb @@ -47,14 +47,7 @@ RSpec.describe "pip" do end context 'with BSD licenses dependencies' do - let(:requirements) do - [ - 'webencodings', - 'idna', - 'click', - 'EasyProcess' - ].join("\n") - end + let(:requirements) { %w(webencodings idna click EasyProcess).join("\n") } it 'finds proper versions of BSD license' do runner.add_file('requirements.txt', requirements) @@ -62,8 +55,29 @@ RSpec.describe "pip" do report = runner.scan expect(report.licenses_for('webencodings')).to eq(['BSD']) + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + expect(report.licenses_for('idna')).to eq(['BSD-like']) + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + expect(report.licenses_for('click')).to eq(['BSD-3-Clause']) + end + + it 'finds proper versions of BSD license' do + runner.add_file('requirements.txt', requirements) + + report = runner.scan + expect(report.licenses_for('EasyProcess')).to eq(['BSD']) end end |
