예제 #1
0
	def test_correct_host_name(self):
		""" Tests that the token is the same as the one passed in. """
		host_name = create_test_data(data=self.host, model=HostName,
		                             retrn=True)

		# Verify host has correct token.
		assert host_name.host == self.host
예제 #2
0
	def test_can_host_name(self):
		""" Tests that a User is actually created. """
		host_name = create_test_data(data=self.host, model=HostName,
		                             retrn=True)

		# Verify host is in db.
		assert host_name in db.session
예제 #3
0
    def test_correct_time(self):
        """ Tests that the minutes is the same as the one passed in. """
        time = create_test_data(data=self.minutes, model=TimeSpent, retrn=True)

        # Verify user has correct token.
        assert time.minutes == self.minutes
예제 #4
0
    def test_can_create_time(self):
        """ Tests that a TimeSpent is actually created. """
        time = create_test_data(data=self.minutes, model=TimeSpent, retrn=True)

        # Verify user is in db.
        assert time in db.session
예제 #5
0
	def test_correct_token(self):
		""" Tests that the token is the same as the one passed in. """
		user = create_test_data(data=self.token, model=UserToken, retrn=True)

		# Verify user has correct token.
		assert user.token == self.token
예제 #6
0
	def test_can_create_user(self):
		""" Tests that a User is actually created. """
		user = create_test_data(data=self.token, model=UserToken, retrn=True)

		# Verify user is in db.
		assert user in db.session