# Creating a single course object from ecommerce.courses.tests.factories import CourseFactory course = CourseFactory() # Creating multiple course objects from ecommerce.courses.tests.factories import CourseFactory courses = CourseFactory.create_batch(3) # Creating a course object with specific attributes from ecommerce.courses.tests.factories import CourseFactory course = CourseFactory( name="Python for Data Science", price=49.99, level="Intermediate" )In the above examples, we are using the `CourseFactory` to create test data for our Course model. We can create a single course object using the `CourseFactory`, create multiple course objects using the `create_batch` method, and specify attributes for a course object by passing them as arguments to the `CourseFactory`. Overall, the `CourseFactory` class is a useful tool for generating test data quickly and easily for e-commerce applications that use a Course model.