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')
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #6
0
 def test_set(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     self.assertEqual(BlokManager.has(blok_name), True)
Exemple #7
0
 def test_set(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     self.assertTrue(BlokManager.has(blok_name))
 def test_set_two_time(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     with pytest.raises(BlokManagerException):
         BlokManager.set(blok_name, Blok)
 def test_set(self):
     blok_name = 'ABlok'
     BlokManager.set(blok_name, Blok)
     assert BlokManager.has(blok_name)