示例#1
0
def test_animate():
    with patch.object(Boids, 'update_boids') as mock_get:
        new_flock = Boids(2, config_filename)
        """new_flock.positions[0][0] = 0
        new_flock.positions[1][0] = 0
        new_flock.positions[0][1] = 1
        new_flock.positions[1][1] = 0"""
        new_flock.animate()
        print mock_get.mock_calls
        mock_get.assert_called_with()
示例#2
0
def test_animate():
    with patch.object(Boids, 'update_boids') as mock_get:
        new_flock = Boids(2, config_filename)
        """new_flock.positions[0][0] = 0
        new_flock.positions[1][0] = 0
        new_flock.positions[0][1] = 1
        new_flock.positions[1][1] = 0"""
        new_flock.animate()
        print mock_get.mock_calls
        mock_get.assert_called_with()