'Ensure cells that are not days of the month have the `nonday` CSS class.
Refs #4574.'

def test_calendar_nonday_class(self):

    self.admin_login(username='super', password='secret', login_url='/')
    self.selenium.get((self.live_server_url + reverse('admin:admin_widgets_member_add')))
    self.selenium.find_element_by_id('id_birthdate_0').send_keys('2013-06-01')
    self.selenium.find_element_by_id('calendarlink0').click()
    calendar0 = self.selenium.find_element_by_id('calendarin0')
    tds = calendar0.find_elements_by_tag_name('td')
    for td in (tds[:6] + tds[(-6):]):
        self.assertEqual(td.get_attribute('class'), 'nonday')
