Skip to content

Commit

Permalink
Hard-wire the year into the metadata test
Browse files Browse the repository at this point in the history
The problem with the previous use of now.year is that this causes the
tests to break on an annual basis.
  • Loading branch information
spakin committed Jan 10, 2024
1 parent b28139c commit 0e7e28b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title>This, Too, is Not a Pipe</dc:title><dc:date>2023-03-31T22:14:00</dc:date><dc:creator><cc:Agent><dc:title>John Doe</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>Copyright (C) 2023 John Doe</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>Awesome Artwork, Inc.</dc:title></cc:Agent></dc:publisher><dc:identifier>10.5555/12345678</dc:identifier><dc:source>https://collections.lacma.org/node/239578</dc:source><dc:relation>isVersionOf "La Trahison des Images"</dc:relation><dc:language>fr.BE</dc:language><dc:subject><rdf:Bag><rdf:li>tobacco pipe</rdf:li><rdf:li>painting</rdf:li><rdf:li>cursive writing</rdf:li></rdf:Bag></dc:subject><dc:coverage>Lessines, Belgium</dc:coverage><dc:description>Painting of a tobacco pipe on a solid background with the French phrase, "Ce n'est pas non plus un tuyau" handwritten beneath it</dc:description><dc:contributor><cc:Agent><dc:title>Fred Nerk</dc:title></cc:Agent></dc:contributor><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/"/></cc:Work>
<dc:title>This, Too, is Not a Pipe</dc:title><dc:date>2024-01-09T22:02:00</dc:date><dc:creator><cc:Agent><dc:title>John Doe</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>Copyright (C) 2024 John Doe</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>Awesome Artwork, Inc.</dc:title></cc:Agent></dc:publisher><dc:identifier>10.5555/12345678</dc:identifier><dc:source>https://collections.lacma.org/node/239578</dc:source><dc:relation>isVersionOf "La Trahison des Images"</dc:relation><dc:language>fr.BE</dc:language><dc:subject><rdf:Bag><rdf:li>tobacco pipe</rdf:li><rdf:li>painting</rdf:li><rdf:li>cursive writing</rdf:li></rdf:Bag></dc:subject><dc:coverage>Lessines, Belgium</dc:coverage><dc:description>Painting of a tobacco pipe on a solid background with the French phrase, "Ce n'est pas non plus un tuyau" handwritten beneath it</dc:description><dc:contributor><cc:Agent><dc:title>Fred Nerk</dc:title></cc:Agent></dc:contributor><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/"/></cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"><cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/><cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/><cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/><cc:requires rdf:resource="http://creativecommons.org/ns#Notice"/><cc:requires rdf:resource="http://creativecommons.org/ns#Attribution"/><cc:requires rdf:resource="http://creativecommons.org/ns#ShareAlike"/></cc:License></rdf:RDF>
</metadata>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"/>
Expand Down
4 changes: 2 additions & 2 deletions tests/test_simple_inkscape_scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ class SimpInkScrTestMetadata(CustomComparisonMixin,
now = datetime.datetime.now()
metadata.title = 'This, Too, is Not a Pipe'
metadata.date = datetime.datetime(2023, 3, 31, 22, 14)
metadata.date = datetime.datetime(2024, 1, 9, 22, 2)
metadata.creator = 'John Doe'
metadata.rights = 'Copyright (C) %d John Doe' % now.year
metadata.rights = 'Copyright (C) 2024 John Doe'
metadata.publisher = 'Awesome Artwork, Inc.'
metadata.identifier = '10.5555/12345678'
metadata.source = 'https://collections.lacma.org/node/239578'
Expand Down

0 comments on commit 0e7e28b

Please sign in to comment.