def METHOD_NAME(self, mock_rq, mock_get_quota):
    rq = mock.MagicMock()
    mock_rq.objects.get.return_value = rq
    rqh = mock.MagicMock()
    rq.handler.return_value = rqh
    rqh.get_current_use.return_value = 6
    mock_get_quota.return_value = {"quota": 3}
    ret = utilities.get_resource_available(TethysApp(), "codename")
    self.assertEqual(0, ret["resource_available"])