Example #1
0
 def test_reload(self):
     BlokManager.load()
     BlokManager.set('invalid blok', None)
     BlokManager.get('invalid blok')
     BlokManager.reload()
     with pytest.raises(BlokManagerException):
         BlokManager.get('invalid blok')
Example #2
0
 def test_set_two_time(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     try:
         BlokManager.set(blok_name, Blok)
         self.fail("No watch dog for set two time the same blok")
     except BlokManagerException:
         pass
Example #3
0
 def test_set_two_time(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     try:
         BlokManager.set(blok_name, Blok)
         self.fail("No watch dog for set two time the same blok")
     except BlokManagerException:
         pass
Example #4
0
 def test_reload(self):
     BlokManager.load()
     BlokManager.set('invalid blok', None)
     BlokManager.get('invalid blok')
     BlokManager.reload()
     try:
         BlokManager.get('invalid blok')
         self.fail("Reload classmethod doesn't reload the bloks")
     except BlokManagerException:
         pass
Example #5
0
 def test_reload(self):
     BlokManager.load()
     BlokManager.set('invalid blok', None)
     BlokManager.get('invalid blok')
     BlokManager.reload()
     try:
         BlokManager.get('invalid blok')
         self.fail("Reload classmethod doesn't reload the bloks")
     except BlokManagerException:
         pass
Example #6
0
 def test_set(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     self.assertEqual(BlokManager.has(blok_name), True)
Example #7
0
 def test_set(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     self.assertTrue(BlokManager.has(blok_name))
Example #8
0
 def test_set_two_time(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     with pytest.raises(BlokManagerException):
         BlokManager.set(blok_name, Blok)
Example #9
0
 def test_set(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     assert BlokManager.has(blok_name)