" \n" +
" def met3(self): \n" +
" self.c.";
Document doc = new Document(d);
IModule module = AbstractModule.createModuleFromDoc("", null, doc, nature, true);
//self.c is found as an assign
Definition[] defs = (Definition[]) module.findDefinition(
CompletionStateFactory.getEmptyCompletionState("self.c", nature, new CompletionCache()), 10, 9, nature);
assertEquals(1, defs.length);
assertEquals("self.c", ((AssignDefinition) defs[0]).target);
assertEquals("C", defs[0].value);
assertSame(module, defs[0].module);
defs = (Definition[]) module.findDefinition(
CompletionStateFactory.getEmptyCompletionState("C", nature, new CompletionCache()), 7, 18, nature);
assertEquals(1, defs.length);
assertEquals("C", defs[0].value);
assertSame(module, defs[0].module);
}