fixed bug in tz_localize to throw an error if the argument to the ambiguous parameter is not one of the 4 correct options
- [x] closes #49565 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

closing as per https://github.com/pandas-dev/pandas/issues/49565#issuecomment-1326611908, but thanks anyway for the pR I believe the test cases were failing after I merged with the main branch to keep it up to date, but I fixed the issue and they should be passing now