diff --git a/controller/Groups.py b/controller/Groups.py index 79a28c9..a5a87b2 100644 --- a/controller/Groups.py +++ b/controller/Groups.py @@ -32,6 +32,7 @@ class Groups( object ): @param user_id: id of current logged-in user (if any) @rtype: dict @return: { + 'group': group_info, 'admin_users': admin_user_list, 'other_users': non_admin_user_list, } @@ -50,6 +51,7 @@ class Groups( object ): other_users = self.__database.select_many( User, group.sql_load_users( admin = False ) ) return dict( + group = group, admin_users = admin_users, other_users = other_users, ) diff --git a/controller/test/Test_groups.py b/controller/test/Test_groups.py index e9f265a..55c7f08 100644 --- a/controller/test/Test_groups.py +++ b/controller/test/Test_groups.py @@ -59,6 +59,10 @@ class Test_groups( Test_controller ): assert result[ u"other_users" ][ 1 ].object_id == self.user3.object_id assert result[ u"other_users" ][ 1 ].username == self.user3.username + assert result[ u"group" ].object_id == self.group.object_id + assert result[ u"group" ].name == self.group.name + assert result[ u"group" ].admin == self.group.admin + def login( self ): result = self.http_post( "/users/login", dict( username = self.username,