Browse Source

finished unittests for plugin date

finished unittests for plugin disks
finished unittests for plugin help
finished unittests for plugin language_selection
finished unittests for plugin logs
finished unittests for plugin network
finished unittests for plugin plugin_manager
finished unittests for plugin shutdown
finished unittests for plugin system_preferences
finished unittests for plugin user_manager
added english 'translations' to all plugins (by copying msgid to msgstr)
master
lars 16 years ago
parent
commit
76e5366619
  1. 22
      plugins/date/date.py
  2. 52
      plugins/date/intl/en/cryptobox-server-feature-date.po
  3. 20
      plugins/date/root_action.py
  4. 39
      plugins/date/unittests.py
  5. 2
      plugins/disks/disks.cs
  6. 22
      plugins/disks/disks.py
  7. 16
      plugins/disks/intl/en/cryptobox-server-feature-disks.po
  8. 34
      plugins/disks/unittests.py
  9. 27
      plugins/help/help.py
  10. 10
      plugins/help/intl/en/cryptobox-server-feature-help.po
  11. 71
      plugins/help/unittests.py
  12. 12
      plugins/language_selection/intl/en/cryptobox-server-feature-language_selection.po
  13. 22
      plugins/language_selection/language_selection.py
  14. 30
      plugins/language_selection/unittests.py
  15. 16
      plugins/logs/intl/en/cryptobox-server-feature-logs.po
  16. 24
      plugins/logs/logs.py
  17. 41
      plugins/logs/unittests.py
  18. 28
      plugins/network/intl/en/cryptobox-server-feature-network.po
  19. 20
      plugins/network/network.py
  20. 20
      plugins/network/root_action.py
  21. 29
      plugins/network/unittests.py
  22. 91
      plugins/partition/intl/en/cryptobox-server-feature-partition.po
  23. 20
      plugins/partition/partition.py
  24. 20
      plugins/partition/root_action.py
  25. 20
      plugins/partition/unittests.py
  26. 36
      plugins/plugin_manager/intl/en/cryptobox-server-feature-plugin_manager.po
  27. 20
      plugins/plugin_manager/plugin_manager.py
  28. 70
      plugins/plugin_manager/unittests.py
  29. 42
      plugins/shutdown/intl/en/cryptobox-server-feature-shutdown.po
  30. 20
      plugins/shutdown/root_action.py
  31. 20
      plugins/shutdown/shutdown.py
  32. 26
      plugins/shutdown/unittests.py
  33. 12
      plugins/system_preferences/intl/en/cryptobox-server-feature-system_preferences.po
  34. 22
      plugins/system_preferences/system_preferences.py
  35. 32
      plugins/system_preferences/unittests.py
  36. 46
      plugins/user_manager/intl/en/cryptobox-server-feature-user_manager.po
  37. 5
      plugins/user_manager/language.hdf
  38. 187
      plugins/user_manager/unittests.py
  39. 25
      plugins/user_manager/user_manager.py
  40. 30
      plugins/volume_automount/intl/en/cryptobox-server-feature-volume_automount.po
  41. 22
      plugins/volume_automount/unittests.py
  42. 20
      plugins/volume_automount/volume_automount.py
  43. 38
      plugins/volume_chpasswd/intl/en/cryptobox-server-feature-volume_chpasswd.po
  44. 22
      plugins/volume_chpasswd/unittests.py
  45. 20
      plugins/volume_chpasswd/volume_chpasswd.py
  46. 34
      plugins/volume_details/intl/en/cryptobox-server-feature-volume_details.po
  47. 22
      plugins/volume_details/unittests.py
  48. 20
      plugins/volume_details/volume_details.py
  49. 56
      plugins/volume_format_fs/intl/en/cryptobox-server-feature-volume_format_fs.po
  50. 22
      plugins/volume_format_fs/unittests.py
  51. 20
      plugins/volume_format_fs/volume_format_fs.py
  52. 54
      plugins/volume_mount/intl/en/cryptobox-server-feature-volume_mount.po
  53. 22
      plugins/volume_mount/unittests.py
  54. 20
      plugins/volume_mount/volume_mount.py
  55. 14
      plugins/volume_props/intl/en/cryptobox-server-feature-volume_props.po
  56. 22
      plugins/volume_props/unittests.py
  57. 20
      plugins/volume_props/volume_props.py
  58. 52
      plugins/volume_rename/intl/en/cryptobox-server-feature-volume_rename.po
  59. 22
      plugins/volume_rename/unittests.py
  60. 20
      plugins/volume_rename/volume_rename.py

22
plugins/date/date.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.plugins.base
@ -8,7 +28,7 @@ class date(cryptobox.plugins.base.CryptoBoxPlugin):
requestAuth = False
rank = 10
def doAction(self, store=None, year=None, month=None, day=None, hour=None, minute=None):
def doAction(self, store=None, year=0, month=0, day=0, hour=0, minute=0):
import datetime
if store:
try:

52
plugins/date/intl/en/cryptobox-server-feature-date.po

@ -4,100 +4,100 @@ msgid ""
msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Change date and time"
msgstr ""
msgstr "Change date and time"
#: Link
msgid "Set date/time"
msgstr ""
msgstr "Set date/time"
#: Title.ConfigDate
msgid "Date and time setting"
msgstr ""
msgstr "Date and time setting"
#: Button.ConfigDate
msgid "Set date and time"
msgstr ""
msgstr "Set date and time"
#: Text.Date
msgid "Date"
msgstr ""
msgstr "Date"
#: Text.Time
msgid "Time"
msgstr ""
msgstr "Time"
#: Text.Months.1
msgid "January"
msgstr ""
msgstr "January"
#: Text.Months.2
msgid "February"
msgstr ""
msgstr "February"
#: Text.Months.3
msgid "March"
msgstr ""
msgstr "March"
#: Text.Months.4
msgid "April"
msgstr ""
msgstr "April"
#: Text.Months.5
msgid "May"
msgstr ""
msgstr "May"
#: Text.Months.6
msgid "June"
msgstr ""
msgstr "June"
#: Text.Months.7
msgid "July"
msgstr ""
msgstr "July"
#: Text.Months.8
msgid "August"
msgstr ""
msgstr "August"
#: Text.Months.9
msgid "September"
msgstr ""
msgstr "September"
#: Text.Months.10
msgid "October"
msgstr ""
msgstr "October"
#: Text.Months.11
msgid "November"
msgstr ""
msgstr "November"
#: Text.Months.12
msgid "December"
msgstr ""
msgstr "December"
#: SuccessMessage.DateChanged.Title
msgid "Date changed"
msgstr ""
msgstr "Date changed"
#: SuccessMessage.DateChanged.Text
msgid "The date was changed successfully."
msgstr ""
msgstr "The date was changed successfully."
#: WarningMessage.InvalidDate.Title
msgid "Invalid value"
msgstr ""
msgstr "Invalid value"
#: WarningMessage.InvalidDate.Text
msgid "An invalid value for date or time was supplied. Please try again."
msgstr ""
msgstr "An invalid value for date or time was supplied. Please try again."

20
plugins/date/root_action.py

@ -1,4 +1,24 @@
#!/usr/bin/env python2.4
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
## necessary: otherwise CryptoBoxRootActions.py will refuse to execute this script
PLUGIN_TYPE = "cryptobox"

39
plugins/date/unittests.py

@ -1,12 +1,34 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
def test_get_date(self):
"""retrieve the current date"""
date = self._getCurrentDate()
def test_change_date(self):
"""set the date back and forth"""
now = self._getCurrentDate()
## copy current time
new_date = dict(now)
@ -22,6 +44,16 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
self.assertEquals(now, self._getCurrentDate())
def test_try_broken_date(self):
"""expect error messages for invalid dates"""
self._setDate({"hour":12, "minute":40, "year":2004, "month":7, "day":0})
self.cmd.find("invalid value for date")
self._setDate({"hour":12, "minute":40, "year":"x", "month":7, "day":2})
self.cmd.find("invalid value for date")
self._setDate({"hour":12, "minute":40, "year":2004, "month":2, "day":31})
self.cmd.find("invalid value for date")
def _getCurrentDate(self):
date_url = self.URL + "date"
self.register_auth(date_url)
@ -41,13 +73,16 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
def _setDate(self, date):
"""for now we have to use this function instead of the one below"""
date_url = self.URL + "date?store=1&year=%d&month=%d&day=%d&hour=%d&minute=%d" % (date["year"], date["month"], date["day"], date["hour"], date["minute"])
date_url = self.URL + "date?weblang=en&store=1&year=%s&month=%s&day=%s&hour=%s&minute=%s"\
% (str(date["year"]), str(date["month"]), str(date["day"]),
str(date["hour"]), str(date["minute"]))
self.register_auth(date_url)
self.cmd.go(date_url)
def _setDateBroken(self, date):
"""this should work, but the parsing of twill seems to be broken"""
"""this should work, but the parsing of twill seems to be broken
as soon as the twill bug is fixed, we should use this function"""
date_url = self.URL + "date"
self.register_auth(date_url)
self.cmd.go(date_url)

2
plugins/disks/disks.cs

@ -4,8 +4,6 @@
<?cs call:handle_messages() ?>
<?cs # TODO: add no-disks-available warning ?>
<?cs if:subcount(Data.Disks) == 0 ?>
<?cs call:hint("Plugins.disks.NoDisksAvailable") ?>
<?cs else ?>

22
plugins/disks/disks.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.plugins.base
class disks(cryptobox.plugins.base.CryptoBoxPlugin):
@ -13,6 +33,6 @@ class disks(cryptobox.plugins.base.CryptoBoxPlugin):
def getStatus(self):
return "TODO"
return ":".join([e.getDevice() for e in self.cbox.getContainerList()])

16
plugins/disks/intl/en/cryptobox-server-feature-disks.po

@ -4,28 +4,28 @@ msgid ""
msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Disk overview"
msgstr ""
msgstr "Disk overview"
#: Link
msgid "Disks"
msgstr ""
msgstr "Disks"
#: Title.Disks
msgid "Available disks"
msgstr ""
msgstr "Available disks"
#: AdviceMessage.NoDisksAvailable.Text
msgid "No available disks were found!"
msgstr ""
msgstr "No available disks were found!"

34
plugins/disks/unittests.py

@ -1,9 +1,41 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
def test_read_form(self):
'''display all devices'''
self.register_auth(self.URL)
self.cmd.go(self.URL + "disks?weblang=en")
self.cmd.find("Available disks")
def test_is_device_in_list(self):
"""check if the device-under-test is in the device list"""
self.register_auth(self.URL)
self.cmd.go(self.URL + "disks?weblang=en")
self.cmd.find("Disks")
self.cmd.find("Available disks")
self.cmd.find(u'Data.Status.Plugins.disks=(.*)$', "m")
devices = self.locals["__match__"].split(":")
self.assertTrue(len(devices)>0)
self.assertTrue(("/dev/%s1" % self.device in devices) or ("/dev/%s2" % self.device in devices))

27
plugins/help/help.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.plugins.base
class help(cryptobox.plugins.base.CryptoBoxPlugin):
@ -17,7 +37,7 @@ class help(cryptobox.plugins.base.CryptoBoxPlugin):
## check for invalid characters and if the page exists in the default language
if page and \
not re.search(u'\W', page) and \
os.path.isfile(os.path.join(self.cbox.prefs["Locations"]["DocDir"], self.efault_lang, page + '.html')):
os.path.isfile(os.path.join(self.cbox.prefs["Locations"]["DocDir"], self.default_lang, page + '.html')):
## everything is ok
pass
else:
@ -36,10 +56,13 @@ class help(cryptobox.plugins.base.CryptoBoxPlugin):
else:
lang = self.default_lang
self.hdf[self.hdf_prefix + "Language"] = lang
## store the current setting for a later "getStatus" call
self.current_lang = lang
self.current_page = page
return "doc"
def getStatus(self):
return "TODO"
return "%s:%s" % (self.current_lang, self.current_page)

10
plugins/help/intl/en/cryptobox-server-feature-help.po

@ -5,19 +5,19 @@ msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "User manual"
msgstr ""
msgstr "User manual"
#: Link
msgid "Help"
msgstr ""
msgstr "Help"

71
plugins/help/unittests.py

@ -1,29 +1,92 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
from twill.errors import *
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
def test_help_pages(self):
def test_help_language_texts(self):
'''help pages should be available in different languages'''
## check english help pages
self.cmd.go(self.URL + "help?weblang=en")
self.cmd.find("Table of Contents")
self.cmd.find("Getting started")
(lang,page) = self._getHelpStatus()
self.assertTrue(lang == "en")
self.assertTrue(page == "CryptoBoxUser")
## check german help pages
self.cmd.go(self.URL + "help?weblang=de")
self.cmd.find("Table of Contents")
self.cmd.find("Wie geht es los")
(lang,page) = self._getHelpStatus()
self.assertTrue(lang == "de")
self.assertTrue(page == "CryptoBoxUser")
self.cmd.go(self.URL + "help?weblang=si")
## check slovene help pages
self.cmd.go(self.URL + "help?weblang=sl")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
#TODO: add a slovene text here, as soon as the help is translated
## add a slovene text here, as soon as the help is translated
(lang,page) = self._getHelpStatus()
## change this to "sl" as soon as the help is translated
self.assertTrue(lang == "en")
self.assertTrue(page == "CryptoBoxUser")
## check french help pages
self.cmd.go(self.URL + "help?weblang=fr")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
#TODO: add a french text here, as soon as the help is translated
## add a french text here, as soon as the help is translated
(lang,page) = self._getHelpStatus()
## change this to "fr" as soon as the help is translated
self.assertTrue(lang == "en")
self.assertTrue(page == "CryptoBoxUser")
## test a random language - it should fall back to english
self.cmd.go(self.URL + "help?weblang=foobar")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
(lang,page) = self._getHelpStatus()
self.assertTrue(lang == "en")
self.assertTrue(page == "CryptoBoxUser")
def test_help_pages(self):
"""check invalid page requests"""
self.cmd.go(self.URL + "help?page=foobar")
(lang,page) = self._getHelpStatus()
self.assertTrue(page == "CryptoBoxUser")
self.cmd.go(self.URL + "help?page=CryptoBoxUser")
(lang,page) = self._getHelpStatus()
self.assertTrue(page == "CryptoBoxUser")
def test_help_default_languages(self):
"""check invalid page requests"""
self.cmd.go(self.URL + "help?weblang=foobar")
(lang,page) = self._getHelpStatus()
self.assertTrue(lang == "en")
def _getHelpStatus(self):
self.cmd.find(u'Data.Status.Plugins.help=(.*)$', "m")
return tuple(self.locals["__match__"].split(":"))

12
plugins/language_selection/intl/en/cryptobox-server-feature-language_selection.po

@ -5,23 +5,23 @@ msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Choose interface language"
msgstr ""
msgstr "Choose interface language"
#: Link
msgid "Languages"
msgstr ""
msgstr "Languages"
#: Title.Language
msgid "Choose an interface language"
msgstr ""
msgstr "Choose an interface language"

22
plugins/language_selection/language_selection.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.plugins.base
@ -13,5 +33,5 @@ class language_selection(cryptobox.plugins.base.CryptoBoxPlugin):
def getStatus(self):
return "TODO"
return ":".join(self.site.langOrder)

30
plugins/language_selection/unittests.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
@ -8,3 +28,13 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
self.cmd.go(url)
self.cmd.find('hoose an interface language')
def test_check_language_list(self):
url = self.URL + "language_selection"
self.register_auth(url)
self.cmd.go(url)
self.cmd.find(u'Data.Status.Plugins.language_selection=(.*)$', "m")
langs = self.locals["__match__"].split(":")
self.assertTrue(len(langs)>1)
self.assertTrue(langs[0] == "en")

16
plugins/logs/intl/en/cryptobox-server-feature-logs.po

@ -4,28 +4,28 @@ msgid ""
msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Show the content of the log file"
msgstr ""
msgstr "Show the content of the log file"
#: Link
msgid "Show log file"
msgstr ""
msgstr "Show log file"
#: Title.Log
msgid "CryptoBox logfiles"
msgstr ""
msgstr "CryptoBox logfiles"
#: Text.EmptyLog
msgid "The logfile of the CryptoBox is empty."
msgstr ""
msgstr "The logfile of the CryptoBox is empty."

24
plugins/logs/logs.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.plugins.base
import os
@ -13,12 +33,12 @@ class logs(cryptobox.plugins.base.CryptoBoxPlugin):
## filter input
try:
lines = int(lines)
if lines < 0: raise(ValueError)
if lines <= 0: raise(ValueError)
except ValueError:
lines = 50
try:
size = int(size)
if size < 0: raise(ValueError)
if size <= 0: raise(ValueError)
except ValueError:
size = 3000
if not pattern is None:

41
plugins/logs/unittests.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
@ -16,5 +36,22 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
self.cmd.go(log_url + "?pattern=ERROR")
self.cmd.find(log_text)
## TODO: check the filtering functions
def test_invalid_args(self):
log_url = self.URL + "logs"
self.cmd.go(log_url + "?lines=10")
self.cmd.find('class="console"')
self.cmd.go(log_url + "?lines=0")
self.cmd.find('class="console"')
self.cmd.go(log_url + "?lines=x")
self.cmd.find('class="console"')
self.cmd.go(log_url + "?size=1000")
self.cmd.find('class="console"')
self.cmd.go(log_url + "?size=0")
self.cmd.find('class="console"')
self.cmd.go(log_url + "?size=x")
self.cmd.find('class="console"')
self.cmd.go(log_url + "?pattern=foobar")
self.cmd.find('class="console"')
self.cmd.go(log_url + u"?pattern=kfj!^(]")
self.cmd.find('class="console"')

28
plugins/network/intl/en/cryptobox-server-feature-network.po

@ -4,44 +4,48 @@ msgid ""
msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Configure network"
msgstr ""
msgstr "Configure network"
#: Title.Network
msgid "Network settings"
msgstr ""
msgstr "Network settings"
#: Button.Network
msgid "Update network settings"
msgstr ""
msgstr "Update network settings"
#: Text.IP
msgid "Network address"
msgstr ""
msgstr "Network address"
#: WarningMessage.InvalidIP.Title
msgid "Invalid value"
msgstr ""
msgstr "Invalid value"
#: WarningMessage.InvalidIP.Text
msgid "An invalid network address (IP) was supplied. Please try again."
msgstr ""
msgstr "An invalid network address (IP) was supplied. Please try again."
#: SuccessMessage.IPChanged.Title
msgid "Network address changed"
msgstr ""
msgstr "Network address changed"
#: SuccessMessage.IPChanged.Text
msgid "The network address has been changed. In a few seconds you will get redirected to the new address."
msgid ""
"The network address has been changed. In a few seconds you will get "
"redirected to the new address."
msgstr ""
"The network address has been changed. In a few seconds you will get "
"redirected to the new address."

20
plugins/network/network.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import subprocess
import os
import cryptobox.plugins.base

20
plugins/network/root_action.py

@ -1,4 +1,24 @@
#!/usr/bin/env python2.4
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#TODO: add netmask and gateway

29
plugins/network/unittests.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
from network import CHANGE_IP_DELAY
@ -13,14 +33,12 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
## extract the current IP from the network plugin output
def getCurrentIP():
self.cmd.go(self.URL + "network")
self.cmd.show()
self.cmd.find(u'Data.Status.Plugins.network=([0-9\.]*)$', "m")
return self.locals["__match__"]
origIPtext = getCurrentIP()
origIPocts = origIPtext.split(".")
## check, if the original IP is valid (contains four octets)
self.assertEquals(4, len(origIPocts))
self.cmd.echo(origIPocts)
wrongIP = "192.168.123.321"
def setIP((ip1, ip2, ip3, ip4)):
self.cmd.go(self.URL + "network")
@ -43,3 +61,10 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
self.assertEquals(origIPtext, getCurrentIP())
def test_inputs(self):
self.register_auth(self.URL + "network")
self.cmd.go(self.URL + "network" + "?redirected=1")
self.cmd.notfind("problem")
self.cmd.go(self.URL + "network" + "?store=1")
self.cmd.find("invalid network address")

91
plugins/partition/intl/en/cryptobox-server-feature-partition.po

@ -4,168 +4,175 @@ msgid ""
msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Disk partitioning"
msgstr ""
msgstr "Disk partitioning"
#: Link
msgid "Partition a disk"
msgstr ""
msgstr "Partition a disk"
#: Title.Partition
msgid "Disk partitions"
msgstr ""
msgstr "Disk partitions"
#: Button.SelectDevice
msgid "Manual partitioning"
msgstr ""
msgstr "Manual partitioning"
#: Button.EasySetup
msgid "Automatic setup"
msgstr ""
msgstr "Automatic setup"
#: Button.AddPartition
msgid "Add"
msgstr ""
msgstr "Add"
#: Button.DelPartition
msgid "Remove"
msgstr ""
msgstr "Remove"
#: Button.SavePartitions
msgid "Write new partition table"
msgstr ""
msgstr "Write new partition table"
#: Button.AbortPartitions
msgid "Cancel"
msgstr ""
msgstr "Cancel"
#: Text.FS.Type
msgid "Filesystem type"
msgstr ""
msgstr "Filesystem type"
#: Text.FS.Fat
msgid "FAT (Windows)"
msgstr ""
msgstr "FAT (Windows)"
#: Text.FS.Ext2
msgid "Ext2"
msgstr ""
msgstr "Ext2"
#: Text.FS.Ext3
msgid "Ext3"
msgstr ""
msgstr "Ext3"
#: Text.FS.Reiser
msgid "Reiser"
msgstr ""
msgstr "Reiser"
#: Text.PartNum
msgid "Id"
msgstr ""
msgstr "Id"
#: Text.PartType
msgid "Type"
msgstr ""
msgstr "Type"
#: Text.Size
msgid "Size (MB)"
msgstr ""
msgstr "Size (MB)"
#: Text.SelectDevice
msgid "Choose a disk for partitioning"
msgstr ""
msgstr "Choose a disk for partitioning"
#: Text.ProgressInfo
msgid "Progress of formatting:"
msgstr ""
msgstr "Progress of formatting:"
#: Text.CreateConfigPartition
msgid "Automatically creating a configuration partition."
msgstr ""
msgstr "Automatically creating a configuration partition."
#: Text.RemovalContainers
msgid "These disks will be destroyed, if you continue"
msgstr ""
msgstr "These disks will be destroyed, if you continue"
#: AdviceMessage.DeviceDataIsLost.Text
msgid "If you continue, you will destroy all data on the choosen disk. Please be VERY careful!"
msgid ""
"If you continue, you will destroy all data on the choosen disk. Please be "
"VERY careful!"
msgstr ""
"If you continue, you will destroy all data on the choosen disk. Please be "
"VERY careful!"
#: SuccessMessage.Partitioned.Title
msgid "Partitioning complete"
msgstr ""
msgstr "Partitioning complete"
#: SuccessMessage.Partitioned.Text
msgid "The disk was partitioned successfully."
msgstr ""
msgstr "The disk was partitioned successfully."
#: SuccessMessage.EasySetup.Title
msgid "Initialization completed"
msgstr ""
msgstr "Initialization completed"
#: SuccessMessage.EasySetup.Text
msgid "Automatic initialization was finished successfully."
msgstr ""
msgstr "Automatic initialization was finished successfully."
#: WarningMessage.NoDisksAvailable.Title
msgid "No disks found"
msgstr ""
msgstr "No disks found"
#: WarningMessage.NoDisksAvailable.Text
msgid "No suitable disks found - please check your configuration and hardware setup."
msgid ""
"No suitable disks found - please check your configuration and hardware setup."
msgstr ""
"No suitable disks found - please check your configuration and hardware setup."
#: WarningMessage.PartitioningFailed.Title
msgid "Partitioning failed"
msgstr ""
msgstr "Partitioning failed"
#: WarningMessage.PartitioningFailed.Text
msgid "The partitioning of the device failed for some reason - sorry!"
msgstr ""
msgstr "The partitioning of the device failed for some reason - sorry!"
#: WarningMessage.FormattingFailed.Title
msgid "Formatting failed"
msgstr ""
msgstr "Formatting failed"
#: WarningMessage.FormattingFailed.Text
msgid "The formatting of the filesystems of the device failed - sorry!"
msgstr ""
msgstr "The formatting of the filesystems of the device failed - sorry!"
#: WarningMessage.DiskIsBusy.Title
msgid "This disk is busy"
msgstr ""
msgstr "This disk is busy"
#: WarningMessage.DiskIsBusy.Text
msgid "Please deactivate all containers of this disk before partitioning."
msgstr ""
msgstr "Please deactivate all containers of this disk before partitioning."
#: WarningMessage.DiskIsBusy.Link.Text
msgid "Show all disks"
msgstr ""
msgstr "Show all disks"
#: WarningMessage.PartitionTooBig.Title
msgid "Invalid size"
msgstr ""
msgstr "Invalid size"
#: WarningMessage.PartitionTooBig.Text
msgid "The container size you entered exceeded the available size of the disk."
msgstr ""
"The container size you entered exceeded the available size of the disk."
#: WarningMessage.PartitionTooSmall.Text
msgid "The minimum size of a container is 10 megabytes."
msgstr ""
msgstr "The minimum size of a container is 10 megabytes."
#: WarningMessage.DiskIsBusy.Link.Rel
msgid "disks"
msgstr ""
msgstr "disks"

20
plugins/partition/partition.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import subprocess
import os
import logging

20
plugins/partition/root_action.py

@ -1,4 +1,24 @@
#!/usr/bin/env python2.4
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
## necessary: otherwise CryptoBoxRootActions.py will refuse to execute this script
PLUGIN_TYPE = "cryptobox"

20
plugins/partition/unittests.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):

36
plugins/plugin_manager/intl/en/cryptobox-server-feature-plugin_manager.po

@ -5,71 +5,71 @@ msgstr ""
"Project-Id-Version: CryptoBox-Server 0.3\n"
"Report-Msgid-Bugs-To: translate@cryptobox.org\n"
"POT-Creation-Date: 2006-11-28 05:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2006-11-29 19:31+0100\n"
"Last-Translator: Lars Kruse <devel@sumpfralle.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 0.10.1\n"
"X-Generator: Pootle 0.10.1\n"
#: Name
msgid "Plugin Manager"
msgstr ""
msgstr "Plugin Manager"
#: Link
msgid "Manage plugins"
msgstr ""
msgstr "Manage plugins"
#: Title.VolumePlugins
msgid "Volume plugins"
msgstr ""
msgstr "Volume plugins"
#: Title.SystemPlugins
msgid "System plugins"
msgstr ""
msgstr "System plugins"
#: Button.SaveSettings
msgid "Save settings"
msgstr ""
msgstr "Save settings"
#: Button.Up
msgid "move up"
msgstr ""
msgstr "move up"
#: Button.Down
msgid "move down"
msgstr ""
msgstr "move down"
#: Text.PluginName
msgid "Plugin"
msgstr ""
msgstr "Plugin"
#: Text.PluginRank
msgid "Order"
msgstr ""
msgstr "Order"
#: Text.RequestsAuth
msgid "Requires admin?"
msgstr ""
msgstr "Requires admin?"
#: Text.InMenu
msgid "Main menu"
msgstr ""
msgstr "Main menu"
#: Text.InPreferences
msgid "Preferences"
msgstr ""
msgstr "Preferences"
#: Text.InVolumeRegister
msgid "Register"
msgstr ""
msgstr "Register"
#: Text.InVolumeProperties
msgid "Properties"
msgstr ""
msgstr "Properties"
#: Text.WhereVisible
msgid "Where visible?"
msgstr ""
msgstr "Where visible?"

20
plugins/plugin_manager/plugin_manager.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.plugins.base
import cryptobox.plugins.manage

70
plugins/plugin_manager/unittests.py

@ -1,3 +1,23 @@
#
# Copyright 2006 sense.lab e.V.
#
# This file is part of the CryptoBox.
#
# The CryptoBox is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The CryptoBox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the CryptoBox; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
@ -8,3 +28,53 @@ class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
self.cmd.go(url)
self.cmd.find('Plugin Manager')
def test_set_options(self):