mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-07 15:33:57 +00:00
new profile carousel implementation reacts to new profiles
This commit is contained in:
parent
a3cfde02c4
commit
2ba2ec38e0
3 changed files with 50 additions and 15 deletions
|
|
@ -76,3 +76,19 @@ class PropertyCarouselTest(TestCase):
|
|||
pc = PropertyCarousel()
|
||||
with self.assertRaises(KeyError):
|
||||
pc.switch("doesntmatter")
|
||||
|
||||
def testHasLayer(self):
|
||||
pc = PropertyCarousel()
|
||||
pc.addLayer("testkey", PropertyLayer())
|
||||
self.assertTrue(pc.hasLayer("testkey"))
|
||||
self.assertFalse(pc.hasLayer("otherkey"))
|
||||
|
||||
def testRemoveLayer(self):
|
||||
pc = PropertyCarousel()
|
||||
pl = PropertyLayer(testkey="testvalue")
|
||||
pc.addLayer("x", pl)
|
||||
pc.switch("x")
|
||||
self.assertEqual(pc["testkey"], "testvalue")
|
||||
pc.removeLayer("x")
|
||||
with self.assertRaises(KeyError):
|
||||
pc.switch("x")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue