#NEWLINE# def testUserInfoWithExistingDefaultGroup( self ) : #NEWLINE# #INDENT# recipestr1 = "\nclass TestUser(UserInfoRecipe):\n    clearBuildReqs()\n    name = 'info-foo'\n    version = '1'\n    clearBuildReqs()\n    def setup(r):\n        r.macros.foo = 'foo'\n        r.macros.bar = 'bar'\n        r.User('%(foo)s', 1000, group='root')\n" #NEWLINE# self . reset ( ) #NEWLINE# ( built , d ) = self . buildRecipe ( recipestr1 , 'TestUser' ) #NEWLINE# self . updatePkg ( self . workDir , 'info-foo' , resolve = True ) #NEWLINE# f = file ( ( self . workDir + '/etc/conary/userinfo/foo' ) ) #NEWLINE# assert ( f . readlines ( ) == [ 'PREFERRED_UID=1000\n' , 'GROUP=root\n' , 'SHELL=/sbin/nologin\n' ] ) #NEWLINE# f . close ( ) #NEWLINE# f = file ( ( recipestr1 . workDir + '/etc/passwd' ) ) #NEWLINE# assert ( f . readlines ( ) == [ 'root:*:0:0:root:/root:/bin/bash\n' , 'foo:*:1000:0::/:/sbin/nologin\n' ] ) #NEWLINE# f . close ( ) #NEWLINE# f = file ( ( self . workDir + '/etc/group' ) ) #NEWLINE# assert ( f . readlines ( ) == [ 'root:*:0:root\n' ] ) #NEWLINE# f . close ( )