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

More test case for arguments of methods #18

Open
ykokw opened this issue Mar 28, 2017 · 0 comments
Open

More test case for arguments of methods #18

ykokw opened this issue Mar 28, 2017 · 0 comments

Comments

@ykokw
Copy link
Contributor

ykokw commented Mar 28, 2017

current test code looks to comfirm only response parsing

For example, in test_niftycloud.py

	# create success
	def test_create_instance_success(self):
		with mock.patch('requests.post', self.mockRequestsPostRunInstance):
			with mock.patch('niftycloud.get_instance_state', self.mockGetInstanceState16):
				self.assertEqual(
					(True, 16, 'created'),
					niftycloud.create_instance(self.mockModule)
				)

test code of create_instance method not confirm following things

  • Is it really pass arguments to requests.post method for API authentication (e.g. signature) ?
  • Is it validate arguments for create instances?

I think it should be separate test case in accordance to test purpose

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

No branches or pull requests

1 participant