@@ -124,55 +124,55 @@ def test_send_email_e2e(db, dummy_smtp):
124124
125125 conn .close ()
126126
127- @pytest .mark .real
128- def test_send_email_real (db ):
129- """
130- End-to-end test for sending a real email via configured SMTP server.
131- This test:
132- - Inserts notifications into DB
133- - Calls process_notifications (sends via real SMTP)
134- - Verifies notifications are marked deleted
135- - ⚠️ Actually sends an email (check inbox!)
136- """
137- db_instance = db
138- conn = db_instance .get_connection ()
139- email = "manav0611@gmail.com"
140-
141- # Notifications from real engineering blogs
142- notifications = [
143- {
144- "heading" : "Google, Software Engineering" ,
145- "post_title" : "Announcing Android 15: What's New" ,
146- "post_url" : "https://android-developers.googleblog.com/2025/08/android-15-whats-new.html"
147- },
148- {
149- "heading" : "Facebook, Software Engineering" ,
150- "post_title" : "Scaling GraphQL at Meta" ,
151- "post_url" : "https://engineering.fb.com/2025/08/16/scaling-graphql/"
152- },
153- {
154- "heading" : "Stripe, Software Engineering" ,
155- "post_title" : "Stripe's Migration to Rust Microservices" ,
156- "post_url" : "https://stripe.com/blog/migration-to-rust-microservices"
157- }
158- ]
159-
160- # Insert notifications into DB
161- for n in notifications :
162- db_instance .add_notification (conn , email , n ["heading" ], 1 , n ["post_url" ], n ["post_title" ])
163-
164- # Process and send notifications via real SMTP
165- process_notifications (db_instance , conn )
166-
167- # Verify all notifications are marked deleted in DB
168- c = conn .cursor ()
169- c .execute ("""
170- SELECT deleted FROM notifications WHERE email = ?
171- """ , (email ,))
172- rows = c .fetchall ()
173-
174- assert len (rows ) == len (notifications )
175- for r in rows :
176- assert r [0 ] == 1 # deleted flag set
177-
178- conn .close ()
127+ # @pytest.mark.real
128+ # def test_send_email_real(db):
129+ # """
130+ # End-to-end test for sending a real email via configured SMTP server.
131+ # This test:
132+ # - Inserts notifications into DB
133+ # - Calls process_notifications (sends via real SMTP)
134+ # - Verifies notifications are marked deleted
135+ # - ⚠️ Actually sends an email (check inbox!)
136+ # """
137+ # db_instance = db
138+ # conn = db_instance.get_connection()
139+ # email = "manav0611@gmail.com"
140+
141+ # # Notifications from real engineering blogs
142+ # notifications = [
143+ # {
144+ # "heading": "Google, Software Engineering",
145+ # "post_title": "Announcing Android 15: What's New",
146+ # "post_url": "https://android-developers.googleblog.com/2025/08/android-15-whats-new.html"
147+ # },
148+ # {
149+ # "heading": "Facebook, Software Engineering",
150+ # "post_title": "Scaling GraphQL at Meta",
151+ # "post_url": "https://engineering.fb.com/2025/08/16/scaling-graphql/"
152+ # },
153+ # {
154+ # "heading": "Stripe, Software Engineering",
155+ # "post_title": "Stripe's Migration to Rust Microservices",
156+ # "post_url": "https://stripe.com/blog/migration-to-rust-microservices"
157+ # }
158+ # ]
159+
160+ # # Insert notifications into DB
161+ # for n in notifications:
162+ # db_instance.add_notification(conn, email, n["heading"], 1, n["post_url"], n["post_title"])
163+
164+ # # Process and send notifications via real SMTP
165+ # process_notifications(db_instance, conn)
166+
167+ # # Verify all notifications are marked deleted in DB
168+ # c = conn.cursor()
169+ # c.execute("""
170+ # SELECT deleted FROM notifications WHERE email = ?
171+ # """, (email,))
172+ # rows = c.fetchall()
173+
174+ # assert len(rows) == len(notifications)
175+ # for r in rows:
176+ # assert r[0] == 1 # deleted flag set
177+
178+ # conn.close()
0 commit comments