예제 #1
0
파일: tests.py 프로젝트: vadmium/pkgbuilder
    def test_aur_request(self):
        aur = pkgbuilder.aur.AUR()
        req = aur.request('info', 'pkgbuilder', 'http')
        if req['results']['Maintainer'] != 'Kwpolska':
            raise Exception('test_aur_contents: Kwpolska isn’t \
the maintainer of PKGBUILDer')

        if req['results']['Name'] != 'pkgbuilder':
            raise Exception('test_aur_contents: AUR is terribly broken, \
“pkgbuilder” isn’t the name of package “pkgbuilder”')
예제 #2
0
파일: tests.py 프로젝트: vadmium/pkgbuilder
    def test_aur_exact(self):
        aur = pkgbuilder.aur.AUR()
        jrr = json.loads(aur.jsonreq('info', 'pkgbuilder', 'http'))
        jrs = json.loads(aur.jsonreq('info', 'pkgbuilder', 'https'))
        arr = aur.request('info', 'pkgbuilder', 'http')
        ars = aur.request('info', 'pkgbuilder', 'https')
        if jrr == jrs == arr == ars:
            pass
        else:
            print('\ntest_aur_exact:')
            print('/jrr')
            print(jrr)
            print('/jrs')
            print(jrs)
            print('/arr')
            print(arr)
            print('/ars')
            print(ars)
            raise Exception('test_aur_exact: something doesn’t match, \
see stdout for details')