Created
July 9, 2010 03:10
-
-
Save gabrielfalcao/468977 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import pwd | |
from lettuce import step, world | |
@step('Given I have the user "(.*)"') | |
def given_i_have_the_user_group1(step, user): | |
world.user = user | |
@step('When I check the passwd file') | |
def when_i_check_the_passwd_file(step): | |
all_users = [x.pw_name for x in pwd.getpwall()] | |
if world.user in all_users: | |
world.user_was_found = True | |
else: | |
world.user_was_found = False | |
@step('Then I see it is on there') | |
def then_i_see_true(step): | |
assert world.user_was_found, "The user %s is not on pwd file" % world.user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Ensure users | |
In order to enable full testing | |
We need to make sure we can test users | |
Scenario: Zomojo users | |
Given I have the user "Hnagios" | |
When I check the passwd file | |
Then I see it is on there | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment