def bestnet(goodnet): goodnet.write(write('data.sdss.org')) goodnet.write(write('api.sdss.org')) config._check_access() config.access = 'collab' config.setRelease('MPL-6') yield goodnet
def test_bad_default_release(self, initconfig, defrel, exprel): ''' this tests some initial conditions on config ''' config._release = defrel config._check_access() msg = 'Release {0} is not in the allowed releases. Switching to {1}'.format(defrel, exprel) with pytest.warns(MarvinUserWarning): warnings.warn(msg, MarvinUserWarning) assert config.release == exprel
def test_good_netrc(self, bestnet): config._check_access() assert config.access == 'collab'
def test_only_one_host(self, goodnet, host, msg): goodnet.write(write(host)) with pytest.warns(BrainUserWarning) as cm: config._check_access() assert msg in str(cm[0].message)