Пример #1
0
import main
main.hello()
print('print hello from the second main')
Пример #2
0
def test_hello():
    assert "Hello" == main.hello()
Пример #3
0
def test_hello_calls_output_func(output_saying_mock):
    import main

    main.hello()

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