r2323 - in /experimental/evolution-data-server/debian: changelog tests/ tests/control tests/edataserver tests/run

jbicha-guest at users.alioth.debian.org jbicha-guest at users.alioth.debian.org
Fri Jan 25 06:54:05 UTC 2013


Author: jbicha-guest
Date: Fri Jan 25 06:54:04 2013
New Revision: 2323

URL: http://svn.debian.org/wsvn/pkg-evolution/?sc=1&rev=2323
Log:
* Team upload.
* Merge from Ubuntu:
  - Add debian/tests/

Added:
    experimental/evolution-data-server/debian/tests/
    experimental/evolution-data-server/debian/tests/control
    experimental/evolution-data-server/debian/tests/edataserver
    experimental/evolution-data-server/debian/tests/run
Modified:
    experimental/evolution-data-server/debian/changelog

Modified: experimental/evolution-data-server/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution-data-server/debian/changelog?rev=2323&op=diff
==============================================================================
--- experimental/evolution-data-server/debian/changelog (original)
+++ experimental/evolution-data-server/debian/changelog Fri Jan 25 06:54:04 2013
@@ -1,3 +1,11 @@
+evolution-data-server (3.6.3-2) UNRELEASED; urgency=low
+
+  * Team upload.
+  * Merge from Ubuntu:
+    - Add debian/tests/
+
+ -- Jeremy Bicha <jbicha at ubuntu.com>  Thu, 24 Jan 2013 23:52:02 -0500
+
 evolution-data-server (3.6.3-1) experimental; urgency=low
 
   * New upstream release

Added: experimental/evolution-data-server/debian/tests/control
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution-data-server/debian/tests/control?rev=2323&op=file
==============================================================================
--- experimental/evolution-data-server/debian/tests/control (added)
+++ experimental/evolution-data-server/debian/tests/control Fri Jan 25 06:54:04 2013
@@ -1,0 +1,2 @@
+Tests: run
+Depends: python3, python3-gi, dbus-test-runner, evolution-data-server, gir1.2-edataserver-1.2

Added: experimental/evolution-data-server/debian/tests/edataserver
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution-data-server/debian/tests/edataserver?rev=2323&op=file
==============================================================================
--- experimental/evolution-data-server/debian/tests/edataserver (added)
+++ experimental/evolution-data-server/debian/tests/edataserver Fri Jan 25 06:54:04 2013
@@ -1,0 +1,46 @@
+#!/usr/bin/env python3
+
+import unittest
+import subprocess
+import sys
+import os
+
+from gi.repository import EDataServer
+
+class TestEDataServer(unittest.TestCase):
+
+  registry = ()
+
+  @classmethod
+  def setUpClass(self):
+    self.registry = EDataServer.SourceRegistry.new_sync(None)
+
+  def testSourceRegistryIsValid(self):
+    self.assertIsInstance(self.registry, EDataServer.SourceRegistry)
+
+  def testSourceRegistryHasSources(self):
+    sources = self.registry.list_sources(None)
+    self.assertIsInstance(sources[0], EDataServer.Source)
+    print()
+    print("Found a source: " + sources[0].get_display_name())
+
+  def testSourceRegistryBuiltinMailAccountExists(self):
+    mail_account = self.registry.ref_builtin_mail_account()
+    self.assertIsInstance(mail_account, EDataServer.Source)
+    self.assertTrue(mail_account.has_extension(EDataServer.SOURCE_EXTENSION_MAIL_ACCOUNT))
+    self.assertIn('local', mail_account.get_uid())
+
+  def testSourceRegistryBuiltinCalendarExists(self):
+    calendar = self.registry.ref_builtin_calendar()
+    self.assertIsInstance(calendar, EDataServer.Source)
+    self.assertTrue(calendar.has_extension(EDataServer.SOURCE_EXTENSION_CALENDAR))
+    self.assertIn('system-calendar', calendar.get_uid())
+
+  def testSourceRegistryBuiltinAddressBookExists(self):
+    addressbook = self.registry.ref_builtin_address_book()
+    self.assertIsInstance(addressbook, EDataServer.Source)
+    self.assertTrue(addressbook.has_extension(EDataServer.SOURCE_EXTENSION_ADDRESS_BOOK))
+    self.assertIn('system-address-book', addressbook.get_uid())
+
+unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
+

Added: experimental/evolution-data-server/debian/tests/run
URL: http://svn.debian.org/wsvn/pkg-evolution/experimental/evolution-data-server/debian/tests/run?rev=2323&op=file
==============================================================================
--- experimental/evolution-data-server/debian/tests/run (added)
+++ experimental/evolution-data-server/debian/tests/run Fri Jan 25 06:54:04 2013
@@ -1,0 +1,3 @@
+#!/bin/sh
+
+dbus-test-runner -t python3 -p debian/tests/edataserver 2>&1




More information about the pkg-evolution-commits mailing list