Added check of notifications to smoke test. Refactoring the python to be cleaner and for reuse