Changeset 1:421645ee4cd9 in mailjam


Ignore:
Timestamp:
May 14, 2012, 6:08:53 PM (12 years ago)
Author:
Francisco de Borja Lopez Rio <borja@…>
Branch:
default
Phase:
public
Message:

Moved the source code from src/ to postman/

Added tests (unittests) splitted into one testing module per app source
file (tests/models.py for testing models.py, tests/storage.py for testing
storage.py and so on). Currently only tests for models have been added.

Added a script to run the tests

Files:
4 added
6 moved

Legend:

Unmodified
Added
Removed
  • postman/models.py

    r0 r1  
    3838        self.members = members
    3939        self.config = config
    40         # FIXME: The path to the storage files directory should be defined
    41         # in a configuration file
    42         self.storage = JsonStorage(os.path.join(config.storage_path,
     40        self.storage = JsonStorage(os.path.join(config['storage'],
    4341                                                self.address))
    4442
     
    8886        member = Member(address)
    8987        self.members[address] = member
     88        return True
    9089               
    9190    def delete_member(self, member):
  • postman/tools.py

    r0 r1  
    1515    """
    1616
     17    if not isinstance(address, str):
     18        return False
     19
    1720    email_re = re.compile(
    1821    r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"  # dot-atom
Note: See TracChangeset for help on using the changeset viewer.