Beispiel #1
0
 def testCreateIncrementsCount(self):
     """
     The counter, appended at the end of the L{Session.id}, is incremented
     each time an L{Session} is created.
     """
     now = datetime.utcnow()
     factory = FluidinfoSessionFactory('API-9001', lambda: now)
     factory.create(self.transact)
     session = factory.create(self.transact)
     expectedDate = now.strftime('%Y%m%d-%H%M%S')
     self.assertEqual('API-9001-%s-000002' % expectedDate, session.id)
Beispiel #2
0
 def testCreateIncrementsCount(self):
     """
     The counter, appended at the end of the L{Session.id}, is incremented
     each time an L{Session} is created.
     """
     now = datetime.utcnow()
     factory = FluidinfoSessionFactory('API-9001', lambda: now)
     factory.create(self.transact)
     session = factory.create(self.transact)
     expectedDate = now.strftime('%Y%m%d-%H%M%S')
     self.assertEqual('API-9001-%s-000002' % expectedDate, session.id)
Beispiel #3
0
 def testCreate(self):
     """L{SessionFactory.create} creates a new L{Session} instance."""
     now = datetime.utcnow()
     factory = FluidinfoSessionFactory('API-9001', lambda: now)
     session = factory.create(self.transact)
     expectedDate = now.strftime('%Y%m%d-%H%M%S')
     self.assertEqual('API-9001-%s-000001' % expectedDate, session.id)
Beispiel #4
0
 def testCreate(self):
     """L{SessionFactory.create} creates a new L{Session} instance."""
     now = datetime.utcnow()
     factory = FluidinfoSessionFactory('API-9001', lambda: now)
     session = factory.create(self.transact)
     expectedDate = now.strftime('%Y%m%d-%H%M%S')
     self.assertEqual('API-9001-%s-000001' % expectedDate, session.id)