[gsoc-admin] tests: Add config_test
- From: Lasse Schuirmann <lschuirma src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gsoc-admin] tests: Add config_test
- Date: Wed, 12 Aug 2015 17:52:02 +0000 (UTC)
commit 7198a02ad3bbf716738a456f224ccca497281073
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date: Wed Aug 12 19:01:05 2015 +0200
tests: Add config_test
tests/config_test.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/config_test.py b/tests/config_test.py
new file mode 100644
index 0000000..72c227a
--- /dev/null
+++ b/tests/config_test.py
@@ -0,0 +1,11 @@
+import datetime
+import unittest
+from maillib.config import apply_substitutions
+
+
+class ModuleTest(unittest.TestCase):
+ def test_apply_substitutions(self):
+ now = datetime.datetime.now()
+ self.assertEqual(apply_substitutions("some/{year}"),
+ "some/"+str(now.year))
+ self.assertEqual(apply_substitutions("some/year"), "some/year")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]