Ueats is a command-line food delivery simulation used throughout the
Pytest Testing Course.
It provides a fully functional CLI for managing users, restaurants,
menus, orders, deliveries, and more.
Students will use this CLI to write automated tests, validate workflows, and learn real-world pytest concepts.
Ueats CLI allows you to:
- Create and manage users
- Manage user wallets
- Create restaurants and menus
- Place and cancel orders
- Simulate restaurant preparation
- Simulate delivery
- Manage database setup and teardown
This CLI is intended to be used inside the course project.
pip install -e .Then run:
ueats --helpueats <command> <subcommand> [arguments]Example:
ueats user add "John" "New York"ueats database setupueats database teardownueats database listList specific tables:
ueats database list -t users restaurants ordersueats user add <user_name> <user_address>Example:
ueats user add "John" "New York"ueats user rename <current_name> <new_name>ueats user remove <user_name>ueats wallet deposit <user_name> <amount>Example:
ueats wallet deposit John 50ueats wallet withdraw <user_name> <amount>ueats restaurant add <restaurant_name> <address>ueats restaurant remove <restaurant_name>ueats restaurant rename <current_name> <new_name>ueats restaurant prepare <restaurant_name> <order_id>ueats menu add <restaurant> <item> <price> <count> <prep_time>Example:
ueats menu add PizzaPlace Pizza 10 5 3Preparation time must be between 1-10 seconds.
ueats menu update <restaurant> <item> <price> <count> <prep_time>ueats menu remove <restaurant> <item>ueats menu rename <restaurant> <current_name> <new_name>ueats order place <user> <restaurant> <item>Example:
ueats order place John PizzaPlace Pizzaueats order cancel <order_id>ueats order history <user> <restaurant>ueats delivery start <order_id> <delivery_time>Delivery time must be between 1-10 seconds.
ueats delivery time <user> <restaurant>ueats database setup
ueats user add John "New York"
ueats wallet deposit John 100
ueats restaurant add PizzaPlace "Downtown"
ueats menu add PizzaPlace Pizza 10 5 2
ueats order place John PizzaPlace Pizza
ueats restaurant prepare PizzaPlace 1
ueats delivery start 1 3Ueats CLI returns structured JSON responses for easy testing:
Example:
{
"status": 0,
"data": {},
"error": ""
}This makes the CLI ideal for pytest automation.
This CLI is intentionally designed to:
- Simulate real systems
- Practice CLI testing
- Learn pytest fixtures
- Test workflows
- Validate state transitions
Students will write tests against Ueats throughout the course.
To see all commands:
ueats --helpTo see command help:
ueats user --helpThis project is part of the course material and intended for educational use.