Ejemplo n.º 1
0
 def test_now_without_tz(self):
     t = DateTime.now()
     self.assertEqual(t.year, 1970)
     self.assertEqual(t.month, 1)
     self.assertEqual(t.day, 1)
     self.assertEqual(t.hour, 12)
     self.assertEqual(t.minute, 34)
     self.assertEqual(t.second, 56.789)
     self.assertIsNone(t.tzinfo)
Ejemplo n.º 2
0
 def test_now_with_tz(self):
     t = DateTime.now(timezone_us_eastern)
     self.assertEqual(t.year, 1970)
     self.assertEqual(t.month, 1)
     self.assertEqual(t.day, 1)
     self.assertEqual(t.hour, 7)
     self.assertEqual(t.minute, 34)
     self.assertEqual(t.second, 56.789)
     self.assertEqual(t.utcoffset(), timedelta(seconds=-18000))
     self.assertEqual(t.dst(), timedelta())
     self.assertEqual(t.tzname(), "EST")
def test_date_array_input(cypher_eval):
    data = [DateTime.now().date(), Date(1976, 6, 13)]
    value = cypher_eval("CREATE (a {x:$x}) RETURN a.x", x=data)
    assert value == data
Ejemplo n.º 4
0
 def test_date_array(self):
     with self.driver.session() as session:
         data = [DateTime.now().date(), Date(1976, 6, 13)]
         value = session.write_transaction(run_and_rollback, "CREATE (a {x:$x}) RETURN a.x", x=data)
         self.assertEqual(value, data)