from autofaker import autodata
@autodata(Weekday)
def test_create_enum_class_returns_not_none(sut):
assert sut is not None
@autodata(Weekday)
def test_create_enum_class_returns_instance(sut):
assert isinstance(sut, Weekday)
import unittest
from autofaker import Autodata
class AnonymousWeekdayTestCase(unittest.TestCase):
def test_create_enum_class_returns_not_none(self):
self.assertIsNotNone(Autodata.create(Weekday))
def test_create_enum_class_returns_instance(self):
self.assertIsInstance(Autodata.create(Weekday), Weekday)
This implements #6
Example usage: