~nataliabidart/software-center/birth-of-a-website.1

« back to all changes in this revision

Viewing changes to tests/test_debfileapplication.py

  • Committer: Michael Vogt
  • Date: 2012-06-11 15:58:19 UTC
  • mfrom: (3020.1.9 the-organizer)
  • Revision ID: michael.vogt@ubuntu.com-20120611155819-rfz96g7s7bysskrt
mergedĀ lp:~nataliabidart/software-center/the-organizer

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
 
 
1
import os
3
2
import unittest
4
 
import logging
5
3
 
6
 
from testutils import setup_test_env
 
4
from tests.utils import (
 
5
    DATA_DIR,
 
6
    get_test_db,
 
7
    setup_test_env,
 
8
)
7
9
setup_test_env()
8
10
 
9
11
from softwarecenter.enums import PkgStates
10
12
from softwarecenter.db.debfile import DebFileApplication, DebFileOpenError
11
 
from softwarecenter.testutils import get_test_db
12
 
 
13
 
DEBFILE_PATH = './data/test_debs/gdebi-test9.deb'
 
13
 
 
14
DEBFILE_DIR = os.path.join(DATA_DIR, 'test_debs')
 
15
 
 
16
DEBFILE_PATH = os.path.join(DEBFILE_DIR, 'gdebi-test9.deb')
14
17
DEBFILE_NAME = 'gdebi-test9'
15
18
DEBFILE_DESCRIPTION = ' provides/conflicts against "nvidia-glx"'
16
19
DEBFILE_SUMMARY = 'testpackage for gdebi - provides/conflicts against real pkg'
17
20
DEBFILE_VERSION = '1.0'
18
21
DEBFILE_WARNING = 'Only install this file if you trust the origin.'
19
22
 
20
 
DEBFILE_PATH_NOTFOUND = './data/test_debs/notfound.deb'
21
 
DEBFILE_PATH_NOTADEB = './data/notadeb.txt'
22
 
DEBFILE_PATH_CORRUPT = './data/test_debs/corrupt.deb'
23
 
DEBFILE_NOT_INSTALLABLE = './data/test_debs/gdebi-test1.deb'
 
23
DEBFILE_PATH_NOTFOUND = os.path.join(DEBFILE_DIR, 'notfound.deb')
 
24
DEBFILE_PATH_NOTADEB = os.path.join(DATA_DIR, 'notadeb.txt')
 
25
DEBFILE_PATH_CORRUPT = os.path.join(DEBFILE_DIR, 'corrupt.deb')
 
26
DEBFILE_NOT_INSTALLABLE = os.path.join(DEBFILE_DIR, 'gdebi-test1.deb')
24
27
 
25
28
 
26
29
class TestDebFileApplication(unittest.TestCase):
97
100
 
98
101
 
99
102
if __name__ == "__main__":
100
 
    logging.basicConfig(level=logging.DEBUG)
101
103
    unittest.main()
102