()
| 624 | |
| 625 | #[test] |
| 626 | fn test_decorated_function() { |
| 627 | let mut parser = PythonParser::new(); |
| 628 | let source = r#" |
| 629 | @app.route("/api/users") |
| 630 | def get_users(): |
| 631 | pass |
| 632 | |
| 633 | @staticmethod |
| 634 | def helper(): |
| 635 | pass |
| 636 | "#; |
| 637 | let entities = parser.extract(source, "routes.py"); |
| 638 | assert!( |
| 639 | entities.iter().any(|e| e.name == "get_users"), |
| 640 | "Should find decorated function get_users" |
| 641 | ); |
| 642 | } |
| 643 | |
| 644 | #[test] |
| 645 | fn test_decorated_class() { |