Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import tempfile | ||
import shutil | ||
import unittest | ||
|
||
from groundstation.node import Node | ||
from groundstation.station import Station | ||
|
||
class StationTestCase(unittest.TestCase): | ||
def setUp(self): | ||
self.node = Node() | ||
self.station = Station(tempfile.mkdtemp(), self.node) | ||
|
||
def tearDown(self): | ||
shutil.rmtree(self.station.repo.path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from station_fixture import StationTestCase | ||
|
||
class TestStationObjectCache(StationTestCase): | ||
"""Proves that querying for an unknown object returns false, then true""" | ||
def test_recently_queried(self): | ||
self.assertFalse(self.station.recently_queried("rawrtest")) | ||
self.assertTrue(self.station.recently_queried("rawrtest")) | ||
self.assertFalse(self.station.recently_queried("rawrtestSomeOther")) | ||
|