import main
main.hello()
print('print hello from the second main')
Esempio n. 2
0
def test_hello():
    assert "Hello" == main.hello()
Esempio n. 3
0
def test_hello_calls_output_func(output_saying_mock):
    import main

    main.hello()

    output_saying_mock.assert_called()
Esempio n. 4
0
def test_hello_xss(app):
    with app.test_request_context(json={'name': '<script>alert(1)</script>'}):
        res = main.hello(flask.request)
        assert '<script>' not in res
Esempio n. 5
0
def test_main_has_hello_func():
    main.hello()
Esempio n. 6
0
def test_hello():
    assert main.hello() == "hello world"
Esempio n. 7
0
def test_hello_empty_json(app):
    with app.test_request_context(json=''):
        res = main.hello(flask.request)
        assert 'Hello World!' in res
Esempio n. 8
0
def test_hello_no_args(app):
    with app.test_request_context():
        res = main.hello(flask.request)
        assert 'Hello World!' in res
Esempio n. 9
0
def test_hello_get(app):
    with app.test_request_context(query_string={'name': 'test'}):
        res = main.hello(flask.request)
        assert 'Hello test!' in res
Esempio n. 10
0
def test_hello():
    assert hello("taka") == "hello, taka"
Esempio n. 11
0
def test_main():
  assert main.hello() == 'ok';
Esempio n. 12
0
 def test_hello_world(self):
     self.assertEqual(main.hello(), "Hello, World!")
Esempio n. 13
0
 def test_main(self):
     h = hello()
     self.assertEqual(h, "hello")
Esempio n. 14
0
def hello():
    return main.hello(request)
Esempio n. 15
0
 def test_hello(self):
     self.assertEqual(hello(), "Hello, world!")
Esempio n. 16
0
def test_hello_args(app):
    with app.test_request_context(json={'name': 'test'}):
        res = main.hello(flask.request)
        assert 'Hello test!' in res
Esempio n. 17
0
 def test_hello(self):
     self.assertEqual(hello(None), 'Hello world!!!')
 def test_hello(self):
     self.assertEqual(hello(), 'Hello', 'wrong message')