Example #1
0
 def test_db_save_user_settings(self):
     stngs = BotSettings(db = ddb, settings_id = settings_id)
     stngs.settings = {"language": "cs_CZ"}
     stngs.save()
     stngs2 = BotSettings(db = ddb, settings_id = settings_id)
     stngs2.load()
     self.assertEqual(stngs.settings, stngs2.settings)
     self.assertEqual(stngs.stored, True)
Example #2
0
 def test_non_existent_settings(self):
     stngs = BotSettings(settings_id = "NON_EXISTENT")
     stngs.load()
     self.assertEqual(stngs.stored, False)