Example #1
0
 def test_gm_delete(self):
     gmc = GlobalMessageClient()
     gmc.load_most_recent_session()
     gm_dict = {"id": "test_msg", "msg": "test global message"}
     gmc.add_gm(gm_dict)
     response = self.client.post('/combine/gm/delete',
                                 {"gm_id": "test_msg"})
     json = response.json()
     self.assertEqual(json['gm_id'], 'test_msg')
     self.assertEqual(json['num_removed'], 1)
Example #2
0
def most_recent_global_message():
    gmc = GlobalMessageClient()
    gmc.load_most_recent_session()
    gm = gmc.session['gms'][0]
    return gm