# Path: tests/helpers/movie_data.py
# class Actor(Document):
# 
#     name = CharField(indexed = True)
#     gross_income_m = FloatField(indexed = True)
#     salary_amount = FloatField(indexed = True,key = 'salary.amount')
#     salary_currency = CharField(indexed = True,key = 'salary.currency')
#     appearances = IntegerField(indexed = True)
#     birth_year = IntegerField(indexed = True)
#     favorite_food = ManyToManyField('Food')
#     is_funny = BooleanField(indexed = True)
#     movies = ManyToManyField('Movie',backref = 'actors')
# 
# class Director(Document):
# 
#     """
#     Warning: There is a circular foreign key relationship between
#     Director and Movie, hence trying to save a pair of those objects
#     that point to each other will yield an exception for e.g.
#     the Postgres backend.
#     """
# 
#     name = CharField(indexed = True)
#     favorite_actor = ForeignKeyField('Actor')
#     best_movie = ForeignKeyField('Movie',unique=True,backref = 'best_of_director')


import pytest
from .helpers.movie_data import Actor, Director



def test_basic_exceptions():
    """
    We test that the basic exceptions work as expected.
    """

    try:

# Path: tests/helpers/movie_data.py
# class Actor(Document):
# 
#     name = CharField(indexed = True)
#     gross_income_m = FloatField(indexed = True)
#     salary_amount = FloatField(indexed = True,key = 'salary.amount')
#     salary_currency = CharField(indexed = True,key = 'salary.currency')
#     appearances = IntegerField(indexed = True)
#     birth_year = IntegerField(indexed = True)
#     favorite_food = ManyToManyField('Food')
#     is_funny = BooleanField(indexed = True)
#     movies = ManyToManyField('Movie',backref = 'actors')
# 
# class Director(Document):
# 
#     """
#     Warning: There is a circular foreign key relationship between
#     Director and Movie, hence trying to save a pair of those objects
#     that point to each other will yield an exception for e.g.
#     the Postgres backend.
#     """
# 
#     name = CharField(indexed = True)
#     favorite_actor = ForeignKeyField('Actor')
#     best_movie = ForeignKeyField('Movie',unique=True,backref = 'best_of_director')


# Path: tests/test_exceptions.py
import pytest
from .helpers.movie_data import Actor, Director




def test_basic_exceptions():
    """
    We test that the basic exceptions work as expected.
    """

    try:

        raise Actor.DoesNotExist