def test_simple_observe(self): """ Simple observe """ obs = coap.observe(self.server.url + "/weather", sub=subscribe) for item in obs.listen(5): self.assertTrue(-50 < item < 50)
def test_observe(self): """ Implement a simple observe process """ r = coap.observe(self.server.url + "/time") self.assertEqual(codes.ok, r.code)