def setUp(self): self.gc = Geocaching() self.t = Trackable("TB1234", self.gc, name="TrackMe") self.c = Cache("GC12345", self.gc, name="Testing", cache_type="Traditional Cache", location=Point(), state=True, found=False, size="micro", difficulty=1.5, terrain=5, author="human", hidden=date(2000, 1, 1), attributes={ "onehour": True, "kids": False, "available": True }, summary="text", description="long text", hint="rot13", favorites=0, pm_only=False, trackables=self.t)
def setUp(self): self.gc = Geocaching() self.t = Trackable("TB123AB", self.gc, name="Testing", type="Travel Bug", location=Point(), owner="human", description="long text", goal="short text")
def setUp(self): self.gc = Geocaching() self.t = Trackable(self.gc, "TB123AB", name="Testing", type="Travel Bug", location="in the hands of human", owner="human", description="long text", goal="short text") self.t._log_page_url = "/track/details.aspx?id=6359246"
def test_from_location(self): gc = Geocaching() gc.login(_username, _password) ref_point = Point(49.74774, 13.37752) with self.subTest("existing location"): self.assertLess( great_circle(Point.from_location(gc, "Pilsen"), ref_point).miles, 10) self.assertLess( great_circle(Point.from_location(gc, "Plzeň"), ref_point).miles, 10) self.assertLess( great_circle(Point.from_location(gc, "plzen"), ref_point).miles, 10) with self.subTest("non-existing location"): with self.assertRaises(GeocodeError): Point.from_location(gc, "qwertzuiop") with self.subTest("empty request"): with self.assertRaises(GeocodeError): Point.from_location(gc, "")
def setUp(self): super().setUp() self.gc = Geocaching(session=self.session)
def setUpClass(cls): cls.gc = Geocaching() cls.gc.login(_username, _password) cls.t = Trackable(cls.gc, "TB1KEZ9") cls.t.load()
def setUpClass(cls): cls.g = Geocaching() cls.g.login(_username, _password)
def setUp(self): self.g = Geocaching()
def setUp(self): self.grid = UTFGrid(Geocaching(), 8800, 5574, 14) self.grid.size = 64 self.cb = GridCoordinateBlock(self.grid)
def setUp(self): self.grid = UTFGrid(Geocaching(), 8800, 5574, 14)
def setUp(self): self.gc = Geocaching(session=session)