# Path: premis_event_service/models.py
# AGENT_TYPE_CHOICES = [
#     ('Personal', 'Personal'),
#     ('Organization', 'Organization'),
#     ('Event', 'Event'),
#     ('Software', 'Software'),
# ]
# class Agent(models.Model):
#     class Meta:
# class LinkObject(models.Model):
# class EventManager(models.Manager):
# class Event(models.Model):
#     class Meta:
# class EventLinkObject(models.Model):
#     class Meta:
#     def __str__(self):
#     def get_absolute_url(self):
#     def __str__(self):
#     def search(self, **kwargs):
#     def searchunfilt(self, max_ordinal=None):
#     def __str__(self):
#     def link_objects_string(self):
#     def is_good(self):


from django.utils import timezone
from premis_event_service import models
from . import factories
import pytest
        assert link_object.object_identifier == str(link_object)


class TestEvent:

    def test_str(self):
        event = factories.EventFactory.build()
        assert event.event_identifier == str(event)

    @pytest.mark.django_db
    def test_link_objects_string_with_link_objects(self):
        event = factories.EventFactory.create(
            linking_objects=True,
            linking_objects__count=2)

        linking_objects = event.linking_objects.all()
        string = '\n'.join([s.object_identifier for s in linking_objects])
        assert string == event.link_objects_string()

    @pytest.mark.django_db
    def test_link_objects_string_without_link_objects(self):
        event = factories.EventFactory.build()
        assert '' == event.link_objects_string()

    def test_is_good_is_true(self):
        event = factories.EventFactory.build(
            event_outcome='http://example.com/#success')

        assert event.is_good() is True


# Path: premis_event_service/models.py
# AGENT_TYPE_CHOICES = [
#     ('Personal', 'Personal'),
#     ('Organization', 'Organization'),
#     ('Event', 'Event'),
#     ('Software', 'Software'),
# ]
# class Agent(models.Model):
#     class Meta:
# class LinkObject(models.Model):
# class EventManager(models.Manager):
# class Event(models.Model):
#     class Meta:
# class EventLinkObject(models.Model):
#     class Meta:
#     def __str__(self):
#     def get_absolute_url(self):
#     def __str__(self):
#     def search(self, **kwargs):
#     def searchunfilt(self, max_ordinal=None):
#     def __str__(self):
#     def link_objects_string(self):
#     def is_good(self):


# Path: tests/test_models.py
from django.utils import timezone
from premis_event_service import models
from . import factories
import pytest

        assert link_object.object_identifier == str(link_object)


class TestEvent:

    def test_str(self):
        event = factories.EventFactory.build()
        assert event.event_identifier == str(event)

    @pytest.mark.django_db
    def test_link_objects_string_with_link_objects(self):
        event = factories.EventFactory.create(
            linking_objects=True,
            linking_objects__count=2)

        linking_objects = event.linking_objects.all()
        string = '\n'.join([s.object_identifier for s in linking_objects])
        assert string == event.link_objects_string()

    @pytest.mark.django_db
    def test_link_objects_string_without_link_objects(self):
        event = factories.EventFactory.build()
        assert '' == event.link_objects_string()

    def test_is_good_is_true(self):
        event = factories.EventFactory.build(
            event_outcome='http://example.com/#success')

        assert event.is_good() is True


    def test_is_good_is_false(self):