<s> from testrunner import testhelp <EOL> from conary_test import rephelp <EOL> from conary . lib import javadeps <EOL> class BasicTest ( testhelp . TestCase ) : <EOL> def testValidTLD ( self ) : <EOL> self . assertEquals ( javadeps . _isValidTLD ( '<STR_LIT:foo>' ) , False ) <EOL> self . assertEquals ( javadeps . _isValidTLD ( '<STR_LIT>' ) , True ) <EOL> class JavaDepsTest ( rephelp . RepositoryHelper ) : <EOL> def testGetDeps ( self ) : <EOL> class FakeSymbolTable ( javadeps . _javaSymbolTable ) : <EOL> def __init__ ( x ) : <EOL> javadeps . _javaSymbolTable . __init__ ( x ) <EOL> x . stringList = { <EOL> <NUM_LIT:1> : '<STR_LIT>' , <EOL> <NUM_LIT:2> : '<STR_LIT>' , <EOL> <NUM_LIT:3> : '<STR_LIT>' , <EOL> <NUM_LIT:4> : '<STR_LIT>' , <EOL> <NUM_LIT:6> : '<STR_LIT>' , <EOL> <NUM_LIT:7> : '<STR_LIT>' , <EOL> <NUM_LIT:9> : '<STR_LIT>' , <EOL> } <EOL> x . classRef = dict ( zip ( range ( <NUM_LIT:1> , <NUM_LIT:6> ) , range ( <NUM_LIT:1> , <NUM_LIT:6> ) ) ) <EOL> x . typeRef = dict ( ( i , ( i , i ) ) for i in range ( <NUM_LIT:6> , <NUM_LIT:10> ) ) <EOL> x . _attributes = { } <EOL> x . classNameIndex = <NUM_LIT:1> <EOL> mockParse = lambda x : ( FakeSymbolTable ( ) , <NUM_LIT:0> ) <EOL> self . mock ( javadeps , '<STR_LIT>' , mockParse ) <EOL> deps = javadeps . getDeps ( '<STR_LIT>' ) <EOL> self . assertEquals ( deps [ <NUM_LIT:1> ] , set ( [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] ) ) </s>
