Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6919)

Unified Diff: appengine/monorail/sitewide/test/sitewide_views_test.py

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/monorail/sitewide/test/sitewide_views_test.py
diff --git a/appengine/monorail/sitewide/test/sitewide_views_test.py b/appengine/monorail/sitewide/test/sitewide_views_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..909a01aa90047135f80f89fb7c9ff19fd9ff75ef
--- /dev/null
+++ b/appengine/monorail/sitewide/test/sitewide_views_test.py
@@ -0,0 +1,27 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is govered by a BSD-style
+# license that can be found in the LICENSE file or at
+# https://developers.google.com/open-source/licenses/bsd
+
+"""Unit tests for sitewide_views module."""
+
+import unittest
+
+from proto import usergroup_pb2
+from sitewide import sitewide_views
+
+
+class GroupViewTest(unittest.TestCase):
+
+ def testConstructor(self):
+ group_settings = usergroup_pb2.MakeSettings('anyone')
+ view = sitewide_views.GroupView('groupname', 123, group_settings, 999)
+
+ self.assertEqual('groupname', view.name)
+ self.assertEqual(123, view.num_members)
+ self.assertEqual('ANYONE', view.who_can_view_members)
+ self.assertEqual('/g/999/', view.detail_url)
+
+
+if __name__ == '__main__':
+ unittest.main()
« no previous file with comments | « appengine/monorail/sitewide/test/sitewide_helpers_test.py ('k') | appengine/monorail/sitewide/test/userprofile_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698