[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
fedora-updates-system/updatessystem/tests test_metadata.py, NONE, 1.1 test_controllers.py, 1.2, 1.3 test_model.py, 1.4, 1.5
- From: Luke Macken (lmacken) <fedora-extras-commits redhat com>
- To: fedora-extras-commits redhat com
- Subject: fedora-updates-system/updatessystem/tests test_metadata.py, NONE, 1.1 test_controllers.py, 1.2, 1.3 test_model.py, 1.4, 1.5
- Date: Sun, 31 Dec 2006 04:10:25 -0500
Author: lmacken
Update of /cvs/fedora/fedora-updates-system/updatessystem/tests
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8229/updatessystem/tests
Modified Files:
test_controllers.py test_model.py
Added Files:
test_metadata.py
Log Message:
- Add GPL headers
- README updates
- Disable transactions in our development environment
- Write mail sending module using TurboMail and some other hackery
- Initialize the updates-stage in our model.py
- Write push code and metadata generation
- Started writing the xmlrpc server code
- Create rpm_fileheader and sha1sum functions in util.py
- Elaborate configuration
- Change logging format
- Start writing a few more testcases
- Wrote comet-based (async httpxmlrequest) Push Console
- Add RPM spec file
***** Error reading new file: [Errno 2] No such file or directory: 'test_metadata.py'
Index: test_controllers.py
===================================================================
RCS file: /cvs/fedora/fedora-updates-system/updatessystem/tests/test_controllers.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- test_controllers.py 3 Dec 2006 19:51:57 -0000 1.2
+++ test_controllers.py 31 Dec 2006 09:10:25 -0000 1.3
@@ -1,11 +1,34 @@
# $Id$
-#import cherrypy
-#
+"""
+import cherrypy
+
#from turbogears import testutil
-#from updatessystem.controllers import Root
+from turbogears import config, testutil, database
+from updatessystem.controllers import Root
+from updatessystem.model import Package, Arch, Release, PackageUpdate
+
+database.set_db_uri("sqlite:///:memory:")
+
+turbogears.update_config(configfile='dev.cfg',
+ modulename='updatessystem.config')
+
+cherrypy.root = Root()
+
+class TestPush(testutil.DBTest):
+
+ def test_push():
+ pkg = Package(name='foobar')
+ arch = Arch(name='i386', subarches=['i686', 'athlon'])
+ rel = Release(name='fc7', long_name='Fedora Core 7')
+ rel.addArch(arch)
+ up = PackageUpdate(nvr='mutt-1.4.2.2-4.fc7', package=pkg, release=rel,
+ submitter='lmacken fedoraproject org',
+ testing=True, type='security',
+ notes='Update notes and such')
+ assert up.nvr == 'mutt-1.4.2.2-4.fc7'
-#cherrypy.root = Root()
+"""
#def test_method():
# "the index method should return a string called now"
Index: test_model.py
===================================================================
RCS file: /cvs/fedora/fedora-updates-system/updatessystem/tests/test_model.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- test_model.py 7 Dec 2006 07:20:07 -0000 1.4
+++ test_model.py 31 Dec 2006 09:10:25 -0000 1.5
@@ -1,6 +1,7 @@
# $Id$
import datetime
+import turbogears
from turbogears import testutil, database
from updatessystem.model import (Release, Package, PackageUpdate, Bugzilla,
@@ -8,6 +9,10 @@
database.set_db_uri("sqlite:///:memory:")
+turbogears.update_config(configfile='dev.cfg',
+ modulename='updatessystem.config')
+
+
class TestRelease(testutil.DBTest):
def get_model(self):
return Release
@@ -27,33 +32,47 @@
return PackageUpdate
def test_creation(self):
pkg = Package(name='foobar')
- arch = Arch(name='i386', subarchs=['i686', 'athlon'])
+ arch = Arch(name='i386', subarches=['i686', 'athlon'])
rel = Release(name='fc5', long_name='Fedora Core 5',
codename='Bordeaux')
rel.addArch(arch)
up = PackageUpdate(nvr='foobar-1.2-3', package=pkg, release=rel,
submitter='lmacken fedoraproject org',
testing=True, type='security',
- embargo=datetime.datetime(2007, 8, 4, 12, 30, 45),
notes='Update notes and such')
bug = Bugzilla(bz_id=1234)
cve = CVE(cve_id="CVE-2006-1234")
up.addBugzilla(bug)
up.addCVE(cve)
+ def test_filelist(self):
+ """ Test out the build_filelist method using a test gaim build. This
+ package is multilib, so we will assert those packages as well
+ """
+ import sys
+ pkg = Package(name='gaim')
+ arch = Arch(name='i386', subarches=['i686', 'athlon'])
+ rel = Release(name='fc6', long_name='Fedora Core 6',
+ codename='Zod')
+ rel.addArch(arch)
+ up = PackageUpdate(nvr='gaim-2.0.0-0.9.beta3.fc6', package=pkg,
+ release=rel, submitter='lmacken fedoraproject org',
+ testing=True, type='security',
+ notes='Update notes and such')
+
+
class TestComment(testutil.DBTest):
def get_model(self):
return Comment
def test_creation(self):
pkg = Package(name='foobar')
- arch = Arch(name='i386', subarchs=['i686', 'athlon'])
+ arch = Arch(name='i386', subarches=['i686', 'athlon'])
rel = Release(name='fc5', long_name='Fedora Core 5',
codename='Bordeaux')
rel.addArch(arch)
up = PackageUpdate(nvr='foobar-1.2-3', package=pkg, release=rel,
submitter='lmacken fedoraproject org',
testing=True, type='bugfix',
- embargo=datetime.datetime(2007, 8, 4, 12, 30, 45),
notes='Update notes and such')
comment = Comment(update=up, user='lmacken fedoraproject org',
text='Test comment')
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]