Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/test/database_test.py   Dandelion-Message-Service(Download)
 
        # Since first should only be second
        tc, some_messages = db.get_messages(time_cookie=first_cookie)
        self.assertNotEqual(some_messages, None)
        self.assertEqual(tc, second_cookie)
 
        # Nothing new since last message was added
        tc, last_messages = db.get_messages(time_cookie=second_cookie)
        self.assertNotEqual(last_messages, None)
        self.assertEqual(len(last_messages), 0)
        db = ContentDB(tempfile.NamedTemporaryFile().name)
 
        _, mlist = db.get_messages()
        self.assertEqual(mlist, [])
 
        db.add_messages([m1, m2, m3])
 
        _, mlist = db.get_messages()
        self.assertTrue(m1 in mlist)
        self.assertTrue(m2 in mlist)
        self.assertTrue(m3 in mlist)
 
        _, mlist = db.get_messages([m1.id, m3.id])

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/test/service_test.py   Dandelion-Message-Service(Download)
        d.add_node("127.0.0.1", 12345, pin=True)
 
        msg = local_db.get_messages()
        self.assertEqual(len(msg[1]), 0)
 
 
        # Complete sync, so we have the message locally
        msg = local_db.get_messages()
        self.assertEqual(len(msg[1]), 1)