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

    main.hello()

    output_saying_mock.assert_called()
Ejemplo 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
Ejemplo n.º 5
0
def test_main_has_hello_func():
    main.hello()
Ejemplo n.º 6
0
def test_hello():
    assert main.hello() == "hello world"
Ejemplo 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
Ejemplo n.º 8
0
def test_hello_no_args(app):
    with app.test_request_context():
        res = main.hello(flask.request)
        assert 'Hello World!' in res
Ejemplo 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
Ejemplo n.º 10
0
def test_hello():
    assert hello("taka") == "hello, taka"
Ejemplo n.º 11
0
def test_main():
  assert main.hello() == 'ok';
Ejemplo n.º 12
0
 def test_hello_world(self):
     self.assertEqual(main.hello(), "Hello, World!")
Ejemplo n.º 13
0
 def test_main(self):
     h = hello()
     self.assertEqual(h, "hello")
Ejemplo n.º 14
0
def hello():
    return main.hello(request)
Ejemplo n.º 15
0
 def test_hello(self):
     self.assertEqual(hello(), "Hello, world!")
Ejemplo 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
Ejemplo n.º 17
0
 def test_hello(self):
     self.assertEqual(hello(None), 'Hello world!!!')
Ejemplo n.º 18
0
 def test_hello(self):
     self.assertEqual(hello(), 'Hello', 'wrong message')