/*
 * User: anna
 * Date: 06-Mar-2008
 */
package com.jetbrains.python;

import com.intellij.codeInsight.completion.CodeCompletionHandlerBase;
import com.intellij.codeInsight.completion.CompletionType;
import com.intellij.testFramework.LightCodeInsightTestCase;

public class PythonCompletionTest extends LightCodeInsightTestCase{

  private void doTest() throws Exception {
    final String testName = getTestName(true);
    configureByFile(testName + ".py");
    new CodeCompletionHandlerBase(CompletionType.BASIC).invoke(getProject(), getEditor(), getFile());
    checkResultByFile(testName + ".after.py");
  }

  protected String getTestDataPath() {
    return PythonTestUtil.getTestDataPath() + "/completion/";
  }

  public void testLocalVar() throws Exception {
    doTest();
  }

  public void testSelfMethod() throws Exception {
    doTest();
  }

  public void testSelfField() throws Exception {
    doTest();
  }

  public void testFuncParams() throws Exception {
    doTest();
  }

  public void testFuncParamsStar() throws Exception {
    doTest();
  }

  public void testPredefinedMethodName() throws Exception {
    doTest();
  }

  public void testPredefinedMethodNot() throws Exception {
    doTest();
  }
}
@@ -81,176 +81,48 @@
 com.
-intellij.codeInsight.completion.CodeCompletionHandlerBase;%0Aimport com.intellij.codeInsight.completion.CompletionType;%0Aimport com.intellij.testFramework.LightCodeInsight
+jetbrains.python.fixtures.PyLightFixture
 Test
@@ -174,32 +174,30 @@
 nds 
+Py
 Light
-CodeInsight
+Fixture
 TestCase
 %7B%0A%0A 
@@ -192,16 +192,17 @@
 TestCase
+ 
 %7B%0A%0A  pri
@@ -290,16 +290,26 @@
 e);%0A    
+myFixture.
 configur
@@ -343,110 +343,49 @@
     
-new CodeCompletionHandlerBase(CompletionType.BASIC).invoke(getProject(), getEditor(), getFile());%0A    
+myFixture.completeBasic();%0A    myFixture.
 chec

convert test to PyLightFixtureTestCase