File: test_get_files.py

package info (click to toggle)
gnome-app-install 0.5.5.1-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,364 kB
  • ctags: 448
  • sloc: python: 4,321; xml: 940; makefile: 42; sh: 9
file content (34 lines) | stat: -rwxr-xr-x 965 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/python

import os
import sys
import subprocess
sys.path.append('../util/')

from getMenuData import *
from addPopconData import *

if __name__ == "__main__":

    subprocess.call(["./get_debs.sh"])

    # test for correct desktop file writing
    processDeb(os.getcwd()+"/brasero_0.5.2-0ubuntu1_i386.deb",
               pkgname="brasero",
               section="universe",
               outputdir="result/")
    # test correct popcon-data merging
    popcon = "popcon_data.txt"
    downloadPopcon("http://popcon.ubuntu.com/by_vote", popcon)
    popcon_data = extractPopconData(popcon)
    mergePopconData("result/", popcon_data)

    # test if everything X-AppInstall releated is in the [desktop entry]
    for line in open("result/brasero.desktop"):
        if line.startswith("["):
            desktop_section = line.strip()
        if line.startswith("X-AppInstall"):
            assert(desktop_section == "[Desktop Entry]")
    print "done"