Exemple #1
0
    def testDateTime(self):
        g = self.g

        # orientdb does not store microseconds
        # so make sure the generated datetime has none
        at = datetime.now().replace(microsecond=0)

        g.datetime.create(name='now', at=at)

        returned_dt = g.datetime.query(name='now').one()

        assert returned_dt.at == at

        # FIXME This returns microseconds, so there's nothing wrong with
        # OrientDB's storage. What's breaking for the above case?
        server_now = g.datetime.create(name='server_now', at=sysdate())
        assert server_now.at >= returned_dt.at
Exemple #2
0
    def testDateTime(self):
        g = self.g

        # orientdb does not store microseconds
        # so make sure the generated datetime has none
        at = datetime.now().replace(microsecond=0)

        g.datetime.create(name='now', at=at)

        returned_dt = g.datetime.query(name='now').one()

        assert returned_dt.at == at

        # FIXME This returns microseconds, so there's nothing wrong with
        # OrientDB's storage. What's breaking for the above case?
        server_now = g.datetime.create(name='server_now', at=sysdate())
        assert server_now.at >= returned_dt.at