Exemplo n.º 1
0
def project(session) -> Project:
    project = Project(
        name="Test GEM Table project",
        session=session
    )
    project.uid = UUID('6b608f78-e341-422c-8076-35adc8828545')
    return project
Exemplo n.º 2
0
def project(session) -> Project:
    project = Project(
        name='Test Project',
        session=session
    )
    project.uid = uuid.UUID('16fd2706-8baf-433b-82eb-8c7fada847da')
    return project
Exemplo n.º 3
0
def test_simple_deserialization(valid_data):
    """Ensure that a deserialized Project looks sane."""
    project: Project = Project.build(valid_data)
    assert project.uid == UUID(valid_data['id'])
    assert project.created_at == arrow.get(valid_data['created_at'] / 1000).datetime
    assert project.name == 'my project'
    assert project.status == 'in-progress'
Exemplo n.º 4
0
def project() -> Project:
    return Project.build(ProjectDataFactory())
Exemplo n.º 5
0
 def register(self,
              name: str,
              description: Optional[str] = None) -> Project:
     project = Project(name=name)
     self.projects.append(project)
     return project
Exemplo n.º 6
0
def test_serialization(valid_data):
    """Ensure that a serialized Project looks sane."""
    project: Project = Project.build(valid_data)
    serialized = project.dump()
    assert serialized == valid_data