def a_group_leaderboard_entry_dto():
    entry = MagicMock()
    entry.entryType = 'group'
    entry.id = a_uuid_string()
    entry.shortId = a_string()
    entry.projectId = a_uuid_string()
    entry.state = 'succeeded'
    entry.experimentStates = an_experiment_states()
    entry.responding = True
    entry.name = a_string()
    entry.organizationName = a_string()
    entry.projectName = a_string()
    entry.description = a_string()
    entry.timeOfCreation = a_timestamp()
    entry.timeOfCompletion = a_timestamp()
    entry.runningTime = randint(1, 1000)
    entry.owner = a_string()
    entry.size = randint(1, 1000)
    entry.tags = [a_string(), a_string()]
    entry.environment = a_string()
    entry.workerType = a_string()
    entry.hostname = a_string()
    entry.sourceSize = randint(1, 1000)
    entry.sourceMd5 = a_string()
    entry.commitId = a_string()
    entry.properties = [a_property(), a_property()]
    entry.parameters = [a_parameter(), a_parameter()]
    entry.channelsLastValues = [a_channel_value(), a_channel_value()]
    entry.trashed = False
    entry.deleted = False
    entry.isBestExperiment = False
    return entry
 def setUp(self):
     super(TestProject, self).setUp()
     self.client = MagicMock()
     self.project = Project(client=self.client,
                            internal_id=a_uuid_string(),
                            namespace=a_string(),
                            name=a_string())
def a_parameter():
    p = MagicMock()
    p.id = a_uuid_string()
    p.name = a_string()
    p.parameterType = 'double'
    p.value = str(uniform(-100, 100))
    return p
def a_channel_value():
    cv = MagicMock()
    cv.channelId = a_uuid_string()
    cv.channelName = a_string()
    cv.channelType = 'numeric'
    cv.x = uniform(1, 100)
    cv.y = str(uniform(1, 100))
    return cv
def an_invited_project_member():
    invitation_info = MagicMock()
    invitation_info.id = a_uuid_string()
    invitation_info.email = a_string() + '@example.com'

    project_member = MagicMock()
    project_member.invitationInfo = invitation_info
    project_member.registeredMemberInfo = None
    project_member.role = 'member'

    return project_member
def a_project():
    project = MagicMock()
    project.id = a_uuid_string()
    project.name = a_string()
    return project