doc.creation_info.add_creator(Person("Alice", "*****@*****.**")) doc.creation_info.set_created_now() review = Review(Person("Joe", None)) review.set_review_date_now() review.comment = "Joe reviewed this document" doc.add_review(review) # File testfile1 = File("TestFile1") testfile1.type = FileType.BINARY testfile1.spdx_id = "TestFilet#SPDXRef-FILE" testfile1.comment = "This is a test file." testfile1.chk_sum = Algorithm("SHA1", "c537c5d99eca5333f23491d47ededd083fefb7ad") testfile1.conc_lics = License.from_identifier("BSD-2-Clause") testfile1.add_lics(License.from_identifier("BSD-2-Clause")) testfile1.copyright = SPDXNone() testfile1.add_artifact("name", "TagWriteTest") testfile1.add_artifact("home", UnKnown()) testfile1.add_artifact("uri", "http://tagwritetest.test") testfile2 = File("TestFile2") testfile2.type = FileType.SOURCE testfile2.spdx_id = "TestFile2#SPDXRef-FILE" testfile2.comment = "This is a test file." testfile2.chk_sum = Algorithm("SHA1", "bb154f28d1cf0646ae21bb0bec6c669a2b90e113") testfile2.conc_lics = License.from_identifier("Apache-2.0") testfile2.add_lics(License.from_identifier("Apache-2.0")) testfile2.copyright = NoAssert() # Package package = Package() package.name = "TagWriteTest"
doc.creation_info.add_creator(Person('Alice', '*****@*****.**')) doc.creation_info.set_created_now() review = Review(Person('Joe', None)) review.set_review_date_now() review.comment = 'Joe reviewed this document' doc.add_review(review) # File testfile1 = File('TestFile1') testfile1.type = FileType.BINARY testfile1.comment = 'This is a test file.' testfile1.chk_sum = Algorithm('SHA1', 'c537c5d99eca5333f23491d47ededd083fefb7ad') testfile1.conc_lics = License.from_identifier('BSD-2-Clause') testfile1.add_lics(License.from_identifier('BSD-2-Clause')) testfile1.copyright = SPDXNone() testfile1.add_artifact('name', 'TagWriteTest') testfile1.add_artifact('home', UnKnown()) testfile1.add_artifact('uri', 'http://tagwritetest.test') testfile2 = File('TestFile2') testfile2.type = FileType.SOURCE testfile2.comment = 'This is a test file.' testfile2.chk_sum = Algorithm('SHA1', 'bb154f28d1cf0646ae21bb0bec6c669a2b90e113') testfile2.conc_lics = License.from_identifier('Apache-2.0') testfile2.add_lics(License.from_identifier('Apache-2.0')) testfile2.copyright = NoAssert() # Package package = Package() package.name = 'TagWriteTest'
doc.data_license = License.from_identifier('CC0-1.0') doc.creation_info.add_creator(Person('Alice', '*****@*****.**')) doc.creation_info.set_created_now() review = Review(Person('Joe', None)) review.set_review_date_now() review.comment = 'Joe reviewed this document' doc.add_review(review) # File testfile1 = File('TestFile1') testfile1.type = FileType.BINARY testfile1.comment = 'This is a test file.' testfile1.chk_sum = Algorithm('SHA1', 'c537c5d99eca5333f23491d47ededd083fefb7ad') testfile1.conc_lics = License.from_identifier('BSD-2-Clause') testfile1.add_lics(License.from_identifier('BSD-2-Clause')) testfile1.copyright = SPDXNone() testfile1.add_artifact('name', 'TagWriteTest') testfile1.add_artifact('home', UnKnown()) testfile1.add_artifact('uri', 'http://tagwritetest.test') testfile2 = File('TestFile2') testfile2.type = FileType.SOURCE testfile2.comment = 'This is a test file.' testfile2.chk_sum = Algorithm('SHA1', 'bb154f28d1cf0646ae21bb0bec6c669a2b90e113') testfile2.conc_lics = License.from_identifier('Apache-2.0') testfile2.add_lics(License.from_identifier('Apache-2.0')) testfile2.copyright = NoAssert() # Package package = Package() package.name = 'TagWriteTest'