Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
url='url',
notes='notes',
tags='tags',
expires=True,
expiry_time=time,
icon=icons.KEY,
kp=self.kp
)
entry.title = changed_string + 'title'
entry.username = changed_string + 'username'
entry.password = changed_string + 'password'
entry.url = changed_string + 'url'
entry.notes = changed_string + 'notes'
entry.expires = False
entry.expiry_time = changed_time
entry.icon = icons.GLOBE
entry.set_custom_property('foo', 'bar')
entry.set_custom_property('multiline', 'hello\nworld')
self.assertEqual(entry.title, changed_string + 'title')
self.assertEqual(entry.username, changed_string + 'username')
self.assertEqual(entry.password, changed_string + 'password')
self.assertEqual(entry.url, changed_string + 'url')
self.assertEqual(entry.notes, changed_string + 'notes')
self.assertEqual(entry.icon, icons.GLOBE)
self.assertEqual(entry.get_custom_property('foo'), 'bar')
self.assertEqual(entry.get_custom_property('multiline'), 'hello\nworld')
self.assertIn('foo', entry.custom_properties)
entry.delete_custom_property('foo')
self.assertEqual(entry.get_custom_property('foo'), None)
# test time properties
self.assertEqual(entry.expires, False)
entry.username = changed_string + 'username'
entry.password = changed_string + 'password'
entry.url = changed_string + 'url'
entry.notes = changed_string + 'notes'
entry.expires = False
entry.expiry_time = changed_time
entry.icon = icons.GLOBE
entry.set_custom_property('foo', 'bar')
entry.set_custom_property('multiline', 'hello\nworld')
self.assertEqual(entry.title, changed_string + 'title')
self.assertEqual(entry.username, changed_string + 'username')
self.assertEqual(entry.password, changed_string + 'password')
self.assertEqual(entry.url, changed_string + 'url')
self.assertEqual(entry.notes, changed_string + 'notes')
self.assertEqual(entry.icon, icons.GLOBE)
self.assertEqual(entry.get_custom_property('foo'), 'bar')
self.assertEqual(entry.get_custom_property('multiline'), 'hello\nworld')
self.assertIn('foo', entry.custom_properties)
entry.delete_custom_property('foo')
self.assertEqual(entry.get_custom_property('foo'), None)
# test time properties
self.assertEqual(entry.expires, False)
self.assertEqual(entry.expiry_time,
changed_time.replace(tzinfo=tz.gettz()).astimezone(tz.gettz('UTC')))
entry.tags = 'changed_tags'
self.assertEqual(entry.tags, ['changed_tags'])
entry.tags = 'changed;tags'
self.assertEqual(entry.tags, ['changed', 'tags'])
entry.tags = ['changed', 'again', 'tags']
self.assertEqual(entry.tags, ['changed', 'again', 'tags'])