Exemple #1
0
 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)
Exemple #2
0
 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")
Exemple #3
0
 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"
Exemple #4
0
    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)
Exemple #6
0
 def setUpClass(cls):
     cls.gc = Geocaching()
     cls.gc.login(_username, _password)
     cls.t = Trackable(cls.gc, "TB1KEZ9")
     cls.t.load()
Exemple #7
0
 def setUpClass(cls):
     cls.g = Geocaching()
     cls.g.login(_username, _password)
Exemple #8
0
 def setUp(self):
     self.g = Geocaching()
Exemple #9
0
 def setUp(self):
     self.grid = UTFGrid(Geocaching(), 8800, 5574, 14)
     self.grid.size = 64
     self.cb = GridCoordinateBlock(self.grid)
Exemple #10
0
 def setUp(self):
     self.grid = UTFGrid(Geocaching(), 8800, 5574, 14)
Exemple #11
0
 def setUp(self):
     self.gc = Geocaching(session=session)