Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow integration tests support #100

Open
codingjoe opened this issue Jul 7, 2015 · 7 comments
Open

Flow integration tests support #100

codingjoe opened this issue Jul 7, 2015 · 7 comments

Comments

@codingjoe
Copy link

The error seems to be here:
https://github.com/viewflow/viewflow/blob/master/viewflow/test.py#L76

I made sure that I setup the URL as stated in the documentation.

AssertionError: PATH_INFO doesn't start with /: 'None

@kmmbvnr
Copy link
Contributor

kmmbvnr commented Jul 7, 2015

The test api is not public and unsupported for now.

The tests errors messages now are far away from the real issues. Please, first ensure that flow forks fine with manually access.

@kmmbvnr kmmbvnr closed this as completed Jul 7, 2015
@codingjoe
Copy link
Author

@kmmbvnr I understand that, but we can't just not do unit tests. For now we can fall back to manually executing all HUMAN tasks. But Testing is really important. We can't have untested code in our production systems.

@kmmbvnr
Copy link
Contributor

kmmbvnr commented Jul 7, 2015

The internal testing framework works well for viewflow examples itself well. I can't spot what's wrong with your code from the assertion error message.

@codingjoe
Copy link
Author

I'll look more into it. Should I find any bug, I'll create a PR.

@codingjoe
Copy link
Author

BTW, I found the issue. It's just that you can't execute a task when he's not assigned. All you need is a better exception. And all is fine.

@kmmbvnr kmmbvnr reopened this Aug 3, 2015
@kmmbvnr kmmbvnr added the PRO label Feb 3, 2016
@kmmbvnr kmmbvnr changed the title AssertionError: PATH_INFO doesn't start with /: 'None' Flow integration tests support Mar 21, 2016
@variable
Copy link

@codingjoe I am in the same boat trying to create tests but cannot get past executing a front end task, I have done the user assignment via self.client.post(/workflow/mrt/ram_change/changeramsize/{}/perform_approval/{}/assign/') looks like there is no API for this? Anyway, when I perform post

response = self.client.post(
                '/workflow/mrt/ram_change/changeramsize/{}/perform_approval/{}/'.format(process['id'], latest_task['id']),
                data={'approve': True}
            )

I am getting raise FlowRuntimeError('Activation metadata is broken {}'.format(self.management_form.errors)) seems to complain about the management form meta is not present, how do I get around this? Cheers!

@variable
Copy link

OK, after some digging, I need to supply _viewflow_activation-started in the form data along with current date time.

'_viewflow_activation-started': timezone.now().strftime("%Y-%m-%d %H:%M")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants