Skip to content
Snippets Groups Projects
Commit b1984a00 authored by Alex Buts's avatar Alex Buts
Browse files

Re #13217 added GID method to a user

parent eb2263d0
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,17 @@ class UserProperties(object):
str_parts[ind] = str(getattr(self,prop))
data_string = "".join(str_parts)
return data_string
#
@property
def GID(self):
"""Returns user's group ID which coincide with
number part of the rb directory
"""
if self._user_id:
RBfolder = os.path.basename(self.rb_dir)
return RBfolder[2:]
else:
return None
#
@property
def start_date(self):
......
......@@ -305,6 +305,7 @@ class ISISDirectInelasticConfigTest(unittest.TestCase):
targ_string = user.replace_variables('$instrument$ReductionScript$cycleID$.py')
self.assertEqual(self.instrument+'ReductionScript2015_1.py',targ_string)
self.assertEqual(user.GID,'1310168')
def test_parse_file_description(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment