'Test basic creation of a worker record.'

@mock.patch('oslo_utils.timeutils.utcnow', return_value=datetime.utcnow().replace(microsecond=123))
def test_worker_create_no_subsecond(self, mock_utcnow):

    db.sqlalchemy.api.DB_SUPPORTS_SUBSECOND_RESOLUTION = False
    worker = db.worker_create(self.ctxt, **self.worker_fields)
    db_worker = db.worker_get(self.ctxt, id=worker.id)
    self._assertEqualObjects(worker, db_worker)
    self.assertEqual(0, db_worker.updated_at.microsecond)
