diff --git a/py/modmicropython.c b/py/modmicropython.c
index 31ae7025fe98651d02dd50601e81119e347a44d6..f7d74db2e083264ca14045bcde2c07b2fd457f38 100644
--- a/py/modmicropython.c
+++ b/py/modmicropython.c
@@ -120,6 +120,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_alloc_emergency_exception_buf_obj, mp_alloc_
 
 STATIC const mp_rom_map_elem_t mp_module_micropython_globals_table[] = {
     { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_micropython) },
+    { MP_ROM_QSTR(MP_QSTR_const), MP_ROM_PTR(&mp_identity_obj) },
 #if MICROPY_PY_MICROPYTHON_MEM_INFO
 #if MICROPY_MEM_STATS
     { MP_ROM_QSTR(MP_QSTR_mem_total), MP_ROM_PTR(&mp_micropython_mem_total_obj) },
diff --git a/tests/micropython/const.py b/tests/micropython/const.py
index 09717fd147be7735fac37b2ca2ff6f1f29183268..660a095f2c327ce26d136932719fae923c359d15 100644
--- a/tests/micropython/const.py
+++ b/tests/micropython/const.py
@@ -1,5 +1,7 @@
 # test constant optimisation
 
+from micropython import const
+
 X = const(123)
 Y = const(X + 456)
 
diff --git a/tests/micropython/const2.py b/tests/micropython/const2.py
index fb458843526be09b896b53b6cbc57df11851ae0f..60085a1e044515bdacd048720ff60635f44b00a4 100644
--- a/tests/micropython/const2.py
+++ b/tests/micropython/const2.py
@@ -1,5 +1,7 @@
 # check that consts are not replaced in anything except standalone identifiers
 
+from micropython import const
+
 X = const(1)
 Y = const(2)
 Z = const(3)
diff --git a/tests/micropython/const_error.py b/tests/micropython/const_error.py
index b46efcae271c9ccc6c25845e371df1a30d1dc038..6d3d135b56ebb62c431cd1b0ef540444c16a8b4f 100644
--- a/tests/micropython/const_error.py
+++ b/tests/micropython/const_error.py
@@ -1,5 +1,7 @@
 # make sure syntax error works correctly for bad const definition
 
+from micropython import const
+
 def test_syntax(code):
     try:
         exec(code)