Task Description: Implement a User Registration System in /app/
Functionality Requirement:
Develop a user registration system that allows new users to sign up with a username, email, and password. The system should validate the inputs and ensure that they meet the following criteria:
Username:
Must be unique (not already taken).
Must be between 3 to 15 characters long, consisting of alphanumeric characters only.
Email:
Must be unique (not already registered).
Must be a valid email format.
Password:
Must be at least 8 characters long.
Must contain at least one uppercase letter, one lowercase letter, one digit, and one special character (e.g., @, #, $, etc.).
Additional Requirements:
Implement appropriate error messages for each validation failure.
Create a function register_user(username, email, password) that performs the registration and returns a success message if successful or an error message detailing the issues.
Store user data in a simple in-memory structure (e.g., a list or dictionary) for testing purposes.
Output Expectations:
If a user successfully registers, the function should return "Registration successful!".
If any of the validation checks fail, the function should return a specific error message, e.g., "Username must be unique and between 3 to 15 characters.", or "Email format is invalid.", and so forth.
Ensure to write unit tests that cover all the validation cases mentioned to verify that the implementation works as intended. Place the implementation in the designated /app/ directory.