| 1 | """ |
|---|
| 2 | Test utilities |
|---|
| 3 | """ |
|---|
| 4 | |
|---|
| 5 | class SkipMessages(object): |
|---|
| 6 | """ |
|---|
| 7 | A class that maintains the skipped messages |
|---|
| 8 | """ |
|---|
| 9 | def __init__(self): |
|---|
| 10 | self.messages = [] |
|---|
| 11 | |
|---|
| 12 | def add(self, msg): |
|---|
| 13 | self.messages.append( msg ) |
|---|
| 14 | |
|---|
| 15 | def __len__(self): |
|---|
| 16 | return len(self.messages) |
|---|
| 17 | |
|---|
| 18 | def __iter__(self): |
|---|
| 19 | return iter(self.messages) |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | BASE_URL = 'http://127.0.0.1:8080' |
|---|
| 23 | PROJECT_LIST_URL = '%s/project/list/' % BASE_URL |
|---|
| 24 | |
|---|
| 25 | TWILL_QUIET = True |
|---|
| 26 | |
|---|
| 27 | SKIP_MESSAGES = SkipMessages() |
|---|
| 28 | |
|---|
| 29 | from pathfix import test_dir as TEST_DIR |
|---|
| 30 | from testutil import * |
|---|
| 31 | from testoptions import * |
|---|