Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #tests for if server is up and notifies if it is not
  2. import unittest
  3. from selenium import webdriver
  4. from selenium.webdriver.common.keys import Keys
  5. import os
  6. import time
  7. from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
  8. from selenium.webdriver.common.action_chains import ActionChains
  9. from urllib.request import urlopen
  10. from html.parser import HTMLParser
  11. import smtplib
  12.  
  13.  
  14. class PythonOrgSearch(unittest.TestCase):
  15.  
  16. server = smtplib.SMTP('smtp.gmail.com', 587)
  17. server.login("email@gmail.com", "password")
  18. msg = "Testing if server is down"
  19. server.sendmail("email@gmail.com", "email@gmail.com", msg)
  20.  
  21. if __name__ == "__main__":
  22. unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement