Changeset 11990
- Timestamp:
- 19 Nov 2014, 10:11:47 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py
r11983 r11990 20 20 """ 21 21 import grok 22 from datetime import datetime22 from time import time 23 23 from grok import index 24 24 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState … … 53 53 def __init__(self): 54 54 super(Document, self).__init__() 55 self.id = None 55 timestamp = ("%d" % int(time()*10000))[1:] 56 self.id = "d%s" % timestamp 56 57 return 57 58 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests.py
r11983 r11990 57 57 container = DocumentsContainer() 58 58 document = createObject(u'waeup.Document') 59 document.id = 'my_document'59 id = document.id 60 60 container.addDocument(document) 61 self.assertEqual(container[ 'my_document'], document)61 self.assertEqual(container[id], document) 62 62 self.assertRaises(TypeError, container.addDocument, object()) 63 63 return
Note: See TracChangeset for help on using the changeset viewer.