# Path: third_party/ycmd/ycmd/tests/test_utils.py
# def Setup():
#   handlers.SetServerStateToDefaults()


from ..server_utils import SetUpPythonPath
from webtest import TestApp
from .. import handlers
from nose.tools import ok_, eq_, with_setup
from .test_utils import Setup
import bottle
#
# YouCompleteMe is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with YouCompleteMe.  If not, see <http://www.gnu.org/licenses/>.

SetUpPythonPath()

bottle.debug( True )


@with_setup( Setup )
def SemanticCompletionAvailable_Works_test():
  app = TestApp( handlers.app )
  request_data = {
    'filepath': '/foo',
    'file_data': {
      '/foo': {
        'filetypes': ['python'],
      }
    }
  }

  ok_( app.post_json( '/semantic_completion_available',
                      request_data ).json )



# Path: third_party/ycmd/ycmd/tests/test_utils.py
# def Setup():
#   handlers.SetServerStateToDefaults()


# Path: third_party/ycmd/ycmd/tests/misc_handlers_test.py
from ..server_utils import SetUpPythonPath
from webtest import TestApp
from .. import handlers
from nose.tools import ok_, eq_, with_setup
from .test_utils import Setup
import bottle

#
# YouCompleteMe is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with YouCompleteMe.  If not, see <http://www.gnu.org/licenses/>.

SetUpPythonPath()

bottle.debug( True )


@with_setup( Setup )
def SemanticCompletionAvailable_Works_test():
  app = TestApp( handlers.app )
  request_data = {
    'filepath': '/foo',
    'file_data': {
      '/foo': {
        'filetypes': ['python'],
      }
    }
  }

  ok_( app.post_json( '/semantic_completion_available',
                      request_data ).json )



@with_setup( Setup )