'Test setting due & start dates on sequential'

def test_date_fields(self):

    sequential = self.get_item_from_modulestore(self.seq_usage_key)
    self.assertIsNone(sequential.due)
    self.client.ajax_post(self.seq_update_url, data={'metadata': {'due': '2010-11-22T04:00Z'}})
    sequential = self.get_item_from_modulestore(self.seq_usage_key)
    self.assertEqual(sequential.due, datetime(2010, 11, 22, 4, 0, tzinfo=UTC))
    self.client.ajax_post(self.seq_update_url, data={'metadata': {'start': '2010-09-12T14:00Z'}})
    sequential = self.get_item_from_modulestore(self.seq_usage_key)
    self.assertEqual(sequential.due, datetime(2010, 11, 22, 4, 0, tzinfo=UTC))
    self.assertEqual(sequential.start, datetime(2010, 9, 12, 14, 0, tzinfo=UTC))
