예제 #1
0
파일: test_config.py 프로젝트: rgcl/marvin
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
예제 #2
0
파일: test_config.py 프로젝트: zpace/marvin
 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
예제 #3
0
파일: test_config.py 프로젝트: rgcl/marvin
 def test_good_netrc(self, bestnet):
     config._check_access()
     assert config.access == 'collab'
예제 #4
0
파일: test_config.py 프로젝트: rgcl/marvin
    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)