# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import print_function

from astropy.tests.helper import remote_data
from astropy.table import Table
import astropy.units as u
import requests
import imp

from ... import nist

imp.reload(requests)


@remote_data
class TestNist:

    def test_query_async(self):
        response = nist.core.Nist.query_async(4000 * u.nm, 7000 * u.nm)
        assert response is not None

    def test_query(self):
        result = nist.core.Nist.query(4000 * u.nm, 7000 * u.nm)
        assert isinstance(result, Table)

        # check that no javascript was left in the table
        # (regression test for 1355)
        assert np.all(result['TP'] == 'T8637')

@@ -96,16 +96,36 @@
 nction%0A%0A
+import numpy as np%0A%0A
 from ast
@@ -223,78 +223,29 @@
 s u%0A
-import requests%0Aimport imp%0A%0Afrom ... import nist%0A%0Aimp.reload(requests)
+%0Afrom ... import nist
 %0A%0A%0A@

Add missing numpy import, and cleanup the rest