#NEWLINE# def test_lookupByValue( self ) : #NEWLINE# #INDENT# '\n        Constants can be looked up by their associated value, defined implicitly\n        by the position in which the constant appears in the class definition or\n        explicitly by the argument passed to L{FlagConstant}.\n        ' #NEWLINE# flag = self . FXF . lookupByValue ( 1 ) #NEWLINE# self . assertIdentical ( flag , self . FXF . READ ) #NEWLINE# flag = self . FXF . lookupByValue ( 2 ) #NEWLINE# self . assertIdentical ( flag , self . FXF . WRITE ) #NEWLINE# flag = self . FXF . lookupByValue ( 4 ) #NEWLINE# self . assertIdentical ( flag , self . FXF . APPEND ) #NEWLINE# flag = self . FXF . lookupByValue ( 32 ) #NEWLINE# self . assertIdentical ( flag , self . FXF . EXCLUSIVE ) #NEWLINE# flag = self . FXF . lookupByValue ( 64 ) #NEWLINE# self . assertIdentical ( flag , self . FXF . TEXT )