コード例 #1
0
class TemporalBoundingAnalysisFactory(Factory):
    class Meta:
        model = TemporalBoundingAnalysis
    beginDescriptor = lazy_attribute(lambda x: [ValidDescriptorFactory(), None][randint(0, 1)])
    beginPrecision = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    beginIndexable = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    beginZoneSpecified = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    beginUtcDateTimeString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    beginYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    beginDayOfYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    beginDayOfMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    beginMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    endDescriptor = lazy_attribute(lambda x: [ValidDescriptorFactory(), None][randint(0, 1)])
    endPrecision = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    endIndexable = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    endZoneSpecified = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    endUtcDateTimeString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    endYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    endDayOfYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    endDayOfMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    endMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantDescriptor = lazy_attribute(lambda x: [ValidDescriptorFactory(), None][randint(0, 1)])
    instantPrecision = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    instantIndexable = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    instantZoneSpecified = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    instantUtcDateTimeString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    instantEndUtcDateTimeString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    instantYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantDayOfYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantEndDayOfYear = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantDayOfMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantEndDayOfMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    instantEndMonth = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    rangeDescriptor = lazy_attribute(lambda x: [TimeRangeDescriptorFactory(), None][randint(0, 1)])
コード例 #2
0
class IdentificationAnalysisFactory(Factory):
    class Meta:
        model = IdentificationAnalysis
    fileIdentifierExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    fileIdentifierString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    doiExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    doiString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    parentIdentifierExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    parentIdentifierString = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    hierarchyLevelNameExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    isGranule = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
コード例 #3
0
class TitleAnalysisFactory(Factory):
    class Meta:
        model = TitleAnalysis
    titleExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    titleCharacters = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    alternateTitleExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    alternateTitleCharacters = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    titleFleschReadingEaseScore = lazy_attribute(lambda x: [fake.pyfloat(), None][randint(0, 1)])
    alternateTitleFleschReadingEaseScore = lazy_attribute(lambda x: [fake.pyfloat(), None][randint(0, 1)])
    titleFleschKincaidReadingGradeLevel = lazy_attribute(lambda x: [fake.pyfloat(), None][randint(0, 1)])
    alternateTitleFleschKincaidReadingGradeLevel = lazy_attribute(lambda x: [fake.pyfloat(), None][randint(0, 1)])
コード例 #4
0
class DescriptionAnalysisFactory(Factory):
    class Meta:
        model = DescriptionAnalysis
    descriptionExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    descriptionCharacters = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    descriptionFleschReadingEaseScore = lazy_attribute(lambda x: [fake.pyfloat(), None][randint(0, 1)])
    descriptionFleschKincaidReadingGradeLevel = lazy_attribute(lambda x: [fake.pyfloat(), None][randint(0, 1)])
コード例 #5
0
class InputEventFactory(Factory):
    class Meta:
        model = InputEvent
    timestamp = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
    method = lazy_attribute(lambda x: [MethodFactory(), None][randint(0, 1)])
    source = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    operation = lazy_attribute(lambda x: [OperationTypeFactory(), None][randint(0, 1)])
    failedState = lazy_attribute(lambda x: fake.pybool())
コード例 #6
0
class FileLocationFactory(Factory):
    class Meta:
        model = FileLocation

    uri = lazy_attribute(lambda x: fake.pystr())
    type = lazy_attribute(
        lambda x: [FileLocationTypeFactory(), None][randint(0, 1)])
    deleted = lazy_attribute(lambda x: fake.pybool())
    restricted = lazy_attribute(lambda x: fake.pybool())
    asynchronous = lazy_attribute(lambda x: fake.pybool())
    locality = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    lastModified = lazy_attribute(
        lambda x: [fake.pyint(), None][randint(0, 1)])
    serviceType = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    optionalAttributes = lazy_attribute(
        lambda x: {fake.pystr(): fake.pystr()
                   for _ in range(randint(3, 10))})
コード例 #7
0
class DiscoveryFactory(Factory):
    class Meta:
        model = Discovery
    fileIdentifier = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    parentIdentifier = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    hierarchyLevelName = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    doi = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    purpose = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    status = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    credit = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    title = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    alternateTitle = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    description = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    keywords = lazy_attribute(lambda x: [KeywordsElementFactory() for _ in range(randint(1, 5))])
    topicCategories = lazy_attribute(lambda x: [fake.pystr() for _ in range(randint(1, 5))])
    temporalBounding = lazy_attribute(lambda x: [TemporalBoundingFactory(), None][randint(0, 1)])
    spatialBounding = lazy_attribute(lambda x: [None, PointFactory(), MultiPointFactory(), LineStringFactory(), MultiLineStringFactory(), PolygonFactory(), MultiPolygonFactory()][randint(0, 6)])
    isGlobal = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    acquisitionInstruments = lazy_attribute(lambda x: [InstrumentsFactory() for _ in range(randint(1, 5))])
    acquisitionOperations = lazy_attribute(lambda x: [OperationFactory() for _ in range(randint(1, 5))])
    acquisitionPlatforms = lazy_attribute(lambda x: [PlatformFactory() for _ in range(randint(1, 5))])
    dataFormats = lazy_attribute(lambda x: [DataFormatFactory() for _ in range(randint(1, 5))])
    links = lazy_attribute(lambda x: [LinkFactory() for _ in range(randint(1, 5))])
    responsibleParties = lazy_attribute(lambda x: [ResponsiblePartyFactory() for _ in range(randint(1, 5))])
    thumbnail = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    thumbnailDescription = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    creationDate = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    revisionDate = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    publicationDate = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    citeAsStatements = lazy_attribute(lambda x: [fake.pystr() for _ in range(randint(1, 5))])
    crossReferences = lazy_attribute(lambda x: [ReferenceFactory() for _ in range(randint(1, 5))])
    largerWorks = lazy_attribute(lambda x: [ReferenceFactory() for _ in range(randint(1, 5))])
    useLimitation = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    legalConstraints = lazy_attribute(lambda x: [fake.pystr() for _ in range(randint(1, 5))])
    accessFeeStatement = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    orderingInstructions = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    edition = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    dsmmAccessibility = lazy_attribute(lambda x: fake.pyint())
    dsmmDataIntegrity = lazy_attribute(lambda x: fake.pyint())
    dsmmDataQualityAssessment = lazy_attribute(lambda x: fake.pyint())
    dsmmDataQualityAssurance = lazy_attribute(lambda x: fake.pyint())
    dsmmDataQualityControlMonitoring = lazy_attribute(lambda x: fake.pyint())
    dsmmPreservability = lazy_attribute(lambda x: fake.pyint())
    dsmmProductionSustainability = lazy_attribute(lambda x: fake.pyint())
    dsmmTransparencyTraceability = lazy_attribute(lambda x: fake.pyint())
    dsmmUsability = lazy_attribute(lambda x: fake.pyint())
    dsmmAverage = lazy_attribute(lambda x: fake.pyfloat())
    updateFrequency = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    presentationForm = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    services = lazy_attribute(lambda x: [ServiceFactory() for _ in range(randint(1, 5))])
コード例 #8
0
class AggregatedInputFactory(Factory):
    class Meta:
        model = AggregatedInput

    rawJson = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    rawXml = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])
    initialSource = lazy_attribute(
        lambda x: [fake.pystr(), None][randint(0, 1)])
    type = lazy_attribute(lambda x: [RecordTypeFactory(), None][randint(0, 1)])
    fileInformation = lazy_attribute(
        lambda x: [FileInformationFactory(), None][randint(0, 1)])
    fileLocations = lazy_attribute(
        lambda x:
        {fake.pystr(): FileLocationFactory()
         for _ in range(randint(3, 10))})
    publishing = lazy_attribute(
        lambda x: [PublishingFactory(), None][randint(0, 1)])
    relationships = lazy_attribute(
        lambda x: [RelationshipFactory() for _ in range(randint(1, 5))])
    deleted = lazy_attribute(lambda x: fake.pybool())
    events = lazy_attribute(
        lambda x: [InputEventFactory() for _ in range(randint(1, 5))])
    errors = lazy_attribute(
        lambda x: [ErrorEventFactory() for _ in range(randint(1, 5))])
コード例 #9
0
class PublishingFactory(Factory):
    class Meta:
        model = Publishing
    isPrivate = lazy_attribute(lambda x: fake.pybool())
    until = lazy_attribute(lambda x: [fake.pyint(), None][randint(0, 1)])
コード例 #10
0
class ThumbnailAnalysisFactory(Factory):
    class Meta:
        model = ThumbnailAnalysis
    thumbnailExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
コード例 #11
0
class DataAccessAnalysisFactory(Factory):
    class Meta:
        model = DataAccessAnalysis
    dataAccessExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
コード例 #12
0
class SpatialBoundingAnalysisFactory(Factory):
    class Meta:
        model = SpatialBoundingAnalysis
    spatialBoundingExists = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    isValid = lazy_attribute(lambda x: [fake.pybool(), None][randint(0, 1)])
    validationError = lazy_attribute(lambda x: [fake.pystr(), None][randint(0, 1)])