'Test map rating is removed on map remove'

def test_rating_map_remove(self):

    self.client.login(username=self.user, password=self.passwd)
    new_map = reverse('new_map_json')
    response = self.client.post(new_map, data=self.viewer_config, content_type='text/json')
    map_id = int(json.loads(response.content)['id'])
    ctype = ContentType.objects.get(model='map')
    OverallRating.objects.create(category=1, object_id=map_id, content_type=ctype, rating=3)
    response = self.client.post(reverse('map_remove', args=(map_id,)))
    self.assertEquals(response.status_code, 302)
    rating = OverallRating.objects.filter(category=1, object_id=map_id)
    self.assertEquals(rating.count(), 0)
