[CalendarServer-changes] [9566] CalendarServer/branches/users/glyph/q
source_changes at macosforge.org
source_changes at macosforge.org
Sat Aug 11 01:54:13 PDT 2012
Revision: 9566
http://trac.macosforge.org/projects/calendarserver/changeset/9566
Author: glyph at apple.com
Date: 2012-08-11 01:54:13 -0700 (Sat, 11 Aug 2012)
Log Message:
-----------
simple failing test for creation
Modified Paths:
--------------
CalendarServer/branches/users/glyph/q/twext/enterprise/dal/test/test_record.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/q/
Modified: CalendarServer/branches/users/glyph/q/twext/enterprise/dal/test/test_record.py
===================================================================
--- CalendarServer/branches/users/glyph/q/twext/enterprise/dal/test/test_record.py 2012-08-11 08:54:12 UTC (rev 9565)
+++ CalendarServer/branches/users/glyph/q/twext/enterprise/dal/test/test_record.py 2012-08-11 08:54:13 UTC (rev 9566)
@@ -87,7 +87,21 @@
self.assertEqual(rec2.gamma, "one")
+ @inlineCallbacks
+ def test_simpleCreate(self):
+ """
+ When a record object is created, a row with matching column values will
+ be created in the database.
+ """
+ txn = self.pool.connection()
+ rec = yield TestRecord.create(txn, beta=3, gamma='epsilon')
+ self.assertEquals(rec.beta, 3)
+ self.assertEqual(rec.gamma, 'epsilon')
+ rows = yield txn.execSQL("select BETA, GAMMA from ALPHA")
+ self.assertEqual(rows, [[3, 'epsilon']])
+
+
class TestQuery(object):
"""
Tests for loading row objects from the database.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120811/4558ff42/attachment-0001.html>
More information about the calendarserver-changes
mailing list